NEW YORK — A major blackout had knocked out power to much of the West Side of Manhattan on Saturday night, but Danielle Allen sat in the crook of a doorway with the blissed-out look of a sunbather.

“It’s beautiful,” Allen, a songwriter, said, gazing at sidewalks filled with neighbors who had abandoned their apartments (too hot) and traffic that was moving even slower than usual (dormant traffic lights).

“If it didn’t happen, everyone would be inside in the air-conditioning,” she said. “And now they are out in Hell’s Kitchen, enjoying the breeze.”

The power failure, apparently caused by a malfunctioning substation, disrupted life for hundreds of thousands of people in Manhattan for several hours on a warm summertime weekend evening.

But from the men roasting hot dogs over a candle on the pavement to the friends using the excuse of a warming fridge to crack open Champagne, some New Yorkers did not curse the darkness — they often seemed to enjoy it.

In Times Square, the lights had gone out on Broadway about an hour before curtain, and shows had stayed dark. But cast members cheered up disappointed patrons with impromptu street-side songs.

Outside “Hadestown,” a horn tootled as André De Shields belted a riff on its opening number, subbing in blackout-related themes.

On the pavement in front of “Come From Away,” a full band and cast performed the show’s first tune.

Of course, some people saw nothing amusing about the blackout. It was terrifying for passengers briefly trapped in subway cars. Others, especially older adults, feared that they would not be able to leave apartment buildings because elevators were out of order.

Businesses, from restaurants and bars to movie theaters, lost money. And it was a hectic night for police officers, firefighters and other emergency personnel.

There were no reports of deaths from the blackout, the authorities said.

The power failed at 6:47 p.m., and it was at least three hours before it began returning in stages.

At 46th Street, first it was a traffic light that went from yellow to green in an instant.

A man began dancing as he crossed, singing the words “Can you feel it.”

Then, the bright lights inside Healthy Mart, at 45th Street and 10th Avenue, followed suit, illuminating the store’s operator, Alla Saleh, 32, who sighed in relief behind the counter.

“I lost a lot of ice cream, a lot of food,” he said. “We lost a lot of money.”

But just 10 blocks downtown, it was still lights out at AM-PM Deli — almost.

Mohsen Nadi, 56, the owner, had borrowed a generator from a friend who is a hot-dog vendor.

It whirred on the sidewalk and generated enough watts to illuminate a single bulb in the store.

“We could have closed, but it’s not the money, we just want to enjoy,” Nadi said as he chit-chatted with his son and a friend in the shop. “It’s for the fun, fun, fun.”

Still, the power-haves — gloating with their crisply blowing air-conditioners while power have-nots sweated — set off some grousing.

Sweltering in his apartment, Larry Moran, who works in real estate, escaped outdoors in Hell’s Kitchen.

“I was reading on the internet that 40th Street and Columbus Circle was out of power, and I’m on 37th with my power on, and then an hour later they get their power on and mine goes off,” he said. “It seems like there’s a hidden agenda going on.”

When a doorman called and told a woman named Katherine that the lights were back on at her home on West 52nd Street, she skipped back from Chelsea. She flicked a little flashlight back and forth on the sidewalk as she hustled through a still darkened-patch of the city.

She had weathered the blackout at a friend’s apartment.

“I called my friend — she said, ‘I have power, I have air-conditioning.’ ” she said. “I said, ‘I have a bottle of Champagne that’s going to get warm, I’m coming down to Chelsea.’ ”

“It’s a great New York story. You may have had a hardship through it, for a minute or two, but people come together,” she said.

She darted her flashlight at the streetscape, packed with people hanging out in the dark. “The world is out here.”

By midnight, the power was back across Manhattan.

Alex Cedeno, 53, a construction worker, had spent the blackout on his stoop in Hell’s Kitchen. His TV had shut off and his air-conditioning had died, but he found other entertainment, he said: watching “pretty ladies walk by.”

A half-hour after everything was back to normal, Cedeno was still out there. “It’s kind of cool,” he said. “I loved the darkness.”

This article originally appeared in The New York Times.