There was a boom; then a hum. The lights flickered. A giant plume of smoke filled the New York City sky, and turned it blue.
“A sort of unnatural, fluorescent shade of blue,” said Bill San Antonio, 28, who was watching Thursday night from inside a terminal at La Guardia Airport.
“We thought it was a U.F.O.,” said Yiota Androtsakis, a longtime Astoria resident.
Ms. Androtsakis was not the only one. In the earliest moments, hundreds of Twitter users from across the city posted videos of the eerie lights, causing many on social media to fear an alien invasion.
By late Thursday night officials said the event was caused by nothing more than a transformer explosion.
“No injuries, no fire, no evidence of extraterrestrial activity,” the New York Police Department tweeted, adding later that the explosion was not suspicious. There was one Con Edison employee nearby when the fire started, and the authorities said he was unharmed.
Still, Deputy Inspector Osvaldo Nuñez, the commanding officer of the 114th Precinct, conceded that the episode “was spectacular.”
“You could see it from the precinct, and the precinct is about a half-mile away,” he said. “You felt it in your chest, the explosions, and the night sky turned an electric blue.”
All the excitement caused plenty of problems. Inspector Nuñez said the bright lights and loud bangs caused a surge of 911 calls, with residents reporting explosions and one person calling in a plane crash.
The power went down briefly at La Guardia Airport, forcing a ground stop and causing delays. And the Metropolitan Transportation Authority said in a tweet that No. 7 train service had been disrupted by the power failures.
Even the Rikers Island prison complex, which houses about 10,000 inmates, lost power for about 25 minutes, according to a woman who answered the phone at the North Infirmary Command.
“There’s been confusion pretty much from the start,” said Mr. San Antonio, who was waiting to board a flight to Dallas when the power went out at La Guardia. After the power came back on, he got a text message. His flight had been canceled.
In a statement on Twitter, Con Edison said there had been “a brief electrical fire” at one of its substations in Astoria, “which involved some electrical transformers and caused a transmission dip in the area.” Mayor Bill de Blasio said the blue light was caused by an electrical surge at the substation.
On Twitter, utility officials apologized to dozens of alarmed customers, saying they were “aware of this situation.” Although power failures were reported in parts of Jackson Heights, the utility said late Thursday that “all power lines serving the area are in service and the system is stable.”
Nonetheless, residents on Thursday night were shaken. Ms. Androtsakis said she heard the “weird noise” even through closed windows; after it ceased, she said, she could still hear it in her ears.
The lights were so bright, she added, that in some places an otherwise dark night was as bright as day.
“It was scary,” said Ms. Androtsakis’s neighbor, Mickey, who declined to give his last name. “It was like something from outer space, like we were invaded.”
Closer to the power plant, Peter Dipietrantonio said he and his girlfriend heard a bang and then saw a “green aura” fill his window. Moments later, he said, he saw people rushing away on the street.
“Once we saw people running, we decided to get out,” he said. His girlfriend, Dana Jefferson, stood on the street, carrying the duffel bag she had quickly packed. “She was ready to go,” he said.