New York City tried to regain its footing Sunday after the restoration of power from a massive blackout late into Saturday night amid questions of how the outage happened. 

Utility company Con Edison said in a statement the final impacted customers from the outage – which affected more than 72,000 customers along 30 blocks from Times Square to the Upper West Side – had their power restored just before midnight after blackouts that began at 6:47 p.m. on Saturday.  

“Over the next several days and weeks, our engineers and planners will carefully examine the data and equipment performance relating to this event, and will share our findings with regulators and the public,” the company said in a statement on Sunday. 

Gov. Andrew Cuomo, who deployed New York state troopers during the outage, said Sunday that he was going to tour the transformer that caused the power failure with Con Edison Chairman John McAvoy to figure out exactly what happened. 

“We have to have a system that is designed to handle disruptions and rather than domino, we have a redundancy in this system so this doesn’t happen,” Cuomo said. “… And that’s what we’re going to work on and I want to see with my own Queens eyes the transformer that started it all.”

Mayor Bill de Blasio said police confirmed there was no foul play involved and that the outage was caused by a “mechanical issue.” 

New York City power outage: Here’s what we know about the widespread blackout

Power restored: Partial New York City blackout leaves thousands without electricity

The outage, which came 42 years to the day after The Great Blackout of 1977 dimmed most of Manhattan, shut down Broadway shows and a Jennifer Lopez concert at Madison Square Garden, gridlocked streets as drivers attempted to navigate without traffic lights and left stunned tourists and residents wandering darkened sidewalks.  

Jay Apt, professor and co-director of the Carnegie Mellon Electricity Industry Center, told USA TODAY there will always be some unreliability in the electric power system.

“Power outages are a factor of our life in the power system,” Apt said. “There’s no way to make the power system completely invulnerable.”

Apt said some cities especially prone to longer power outages, for example those afflicted by hurricanes, decide to have power backup for services like ATMs. New York City officials need to decide whether services such as traffic lights, which failed in the outage Saturday, are essential to backup, Apt said. 

“Every city has to make an assessment about whether emergency preparedness requires backup and things aren’t perfect,” Apt said. 

Some Broadway casts and Carnegie Hall performers declared the show must go on. One Twitter user tweeted a video of the cast of Hamilton singing out the windows of the Rogers theater after the show was canceled. 

Another user tweeted a video of an impromptu Carnegie Hall concert on the street for patrons after being evacuated from the concert hall. 

Many New Yorkers out and about on the West side of Manhattan got caught in the chaos. Karen Janowsky, a vendor selling ponchos at a street fair in Rockefeller Center, said her setup equipment was stolen while she went to her car to pack her ponchos. The power went out just before she got to the car.

“I was alone and I couldn’t get to everything, so they stole my stuff,” she said. “It was chaos, with fire engines and people packing the streets. When the lights went out, I was one minute from getting my car in the garage.” 

May Martinez, an Inwood resident, told The New York Times she got stuck on an A train during the power outage. 

“It was scary,” she said. “We were just wondering — are we going to sleep here?”

 The Metropolitan Transportation Authority said the outage caused “extensive delays on many subway lines.”

“Thank you all for sticking with us tonight,” the subway service tweeted Saturday. “Thank you to the thousands of public servants across New York City who worked hard to get everything back the way it should be for everyone. Have a good night and take care.” 

Contributing: The Associated Press