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

Utility company Con Edison said in a statement that the last of the customers who lost electricity – more than 72,000 customers along 30 blocks from Times Square to the Upper West Side lost power – saw their power restored just before midnight after blackouts that began at 6:47 p.m. 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 inspect 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 that there was no foul play involved and that the outage was caused by a "mechanical issue."

De Blasio was campaigning for his presidential bid in Iowa when the power outage struck New York, and he returned to his city several hours into the outage. At a news conference Sunday, De Blasio defended himself against criticism for not being in New York when the blackout hit.

"As someone who travels, and I traveled before this campaign, you have to be in charge wherever you are," de Blasio said. "And again with email, with cellphones, I’m in regular touch with my folks confirming the situation’s being handled properly."

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 tried to navigate without traffic lights and left stunned tourists and residents wandering darkened sidewalks.

Sen. Charles Schumer, D-N.Y., called for the Department of Energy's Office of Electricity to investigate how Con Edison maintains the city's power grid. Schumer said federal agencies will be able to apply what they learn from New York City's power outage on a national scale.

Jay Apt, professor and co-director of the Carnegie Mellon Electricity Industry Center, told USA TODAY there will always be some unreliability in the 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 in hurricanes zones, 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 back up, 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 Richard Rodgers Theatre 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 rain gear 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