Every unit in a 46-building apartment complex lost power for several hours overnight, officials said.
The FDNY says it was called to the scene after the outages were first reported at the Spring Creek Towers in East New York at about 8:30 p.m. Wednesday.
Power was restored to about half the buildings before midnight, and witnesses said the lights came back on in the rest of the buildings early Thursday.
About 65 firefighters helped people who were trapped in the 11- to 20-story buildings' elevators.
No injuries were reported.
It's unclear what caused the outages.