Sitting in the dressing room, Astrid Van Wieren, who plays Beulah in the musical “Come From Away,” was getting ready for the Saturday evening performance when her makeup lights suddenly flicked off.

It wasn’t a fluke. Electricity was cutting out at theaters around the west side of Manhattan after a blackout struck New York on Saturday night.

At first, a sense of giddiness spread around the cast.

“It’s like having a snow day at school,” Van Wieren said about the potential of a canceled show and a free Saturday evening.

But then she started to think about all the people who had come for the show. It might have been their only chance to catch “Come From Away” live.

The power outage stranded subway passengers, shut out the lights in Times Square and stopped or canceled multiple events on the west side of Manhattan, with fans evacuating a Jennifer Lopez concert at Madison Square Garden. On Broadway, the blackout occurred about an hour before many of the shows were set to begin, eventually leading to the cancellation of 26 of the 30 shows scheduled to run Saturday evening, including “Hamilton,” “Wicked” and “The Lion King.”

As they sat in the audience seats awaiting the decision, Van Wieren and fiddler Caitlin Warbelow rallied their cast mates to go perform “Welcome To the Rock.” She said they moved like a wave to the door to “shout-sing” the opening number for the fans outside.

Performers from multiple Broadway shows gave impromptu renditions to crowds along the streets outside the theaters.

“There was a line of people outside waiting, so we hate to have to not do the show for them,” Aaron Tveit, one of the stars of “Moulin Rouge! The Musical,” told the New York Times as he left the Hirschfeld Theatre. “Hopefully everyone is just safe.”

“Hadestown” cast members, including Tony winner André De Shields and a horn player, sang amid a crowd outside the Walter Kerr Theatre.

The cast of “Rock of Ages” also approached the street to give the encircled fans a brief performance.

The cast of “Waitress” also started performing outside after the cancellation.

From the musical “Frozen,” cast members appeared to share their music with the crowds as well.

Performers from other canceled Saturday night shows across the city also played music and sang on the sidewalks. Outside Carnegie Hall, choir performers from Millennial Choirs and Orchestra chorused as the evening sun dipped low in the sky.

Some Broadway actors stayed inside while waiting for word on whether they had to put on a show that evening.

Julie Halston, who plays Rita Marshall in the musical “Tootsie,” was in full makeup when her dressing room went completely dark at the Marquis Theatre.

The cast congregated in the dressing room of lead performer Santino Fontana, Halston said, and ate snacks.

“We were really happy the power came back on but we managed to have fun,” she said. “We managed to take care of everyone.”

The Broadway League has advised ticket holders to seek out exchanges or refunds from where they originally purchased their tickets. The Sunday Broadway shows were scheduled to go on as usual.

After the impromptu performance, Van Wieren and other members of “Come From Away” walked about 30 blocks north to Fred’s for a drink and some food. There, they watched as the video of their performance rocketed up in views on the Internet.

“We felt bad that [audiences] weren’t going to be able to see the show,” Van Wieren said. “But at least we were going to give them a special moment and a story to take home.”

Charlotte St. Martin, president of the Broadway League, said she was proud of the casts and that among performers, “there is a real mentality that the show must go on.”