LOS ANGELES (AP) — A power outage at Los Angeles International Airport diverted, delayed or cancelled dozens of flights Wednesday night, and hundreds of passengers were briefly stuck on grounded aircraft.

A 2-second power "bump" shortly after 6 p.m. caused the entire airport to go dark but electrical generators kicked in and all but three terminals had power within an hour, airport spokeswoman Olga Gallardo said.

Passengers cheered when power was finally restored to Terminals 1, 7 and 8 three hours or more later.

Southwest Airlines diverted or cancelled about 40 flights, spokeswoman Michelle Agnew said.

The airline said its normal schedule would resume Thursday morning.

United Airlines said it delayed 19 flights, cancelled two and diverted nine.

Joelle Lai, 35, was waiting in a stalled security line when she received a text message that her flight to Las Vegas was cancelled.

"I should have just driven, I would have been there already," she told the Los Angeles Times.

"My latest dose of bad luck: ALL of LAX airport has lost power and my luggage is being held hostage. No air, no power, and having to siphon off my laptop's battery to keep my phone alive," a passenger tweeted. "But I'm here!"

Because electrically-powered jet bridges weren't working, hundreds of people were briefly stuck on planes on the tarmac until portable stairs were brought in to deplane them.

The outage scrambled check-in and affected everything from parking structures to cash registers at airport restaurants. The airport's signature colored pylons were also dark.

The delay in resuming power came from switching back from emergency power to the regular supply from the city's Department of Water and Power.

Equipment had to be "rebooted" and checked to make sure it was working properly, Gallardo said.

"A lot of the electrical times like TSA screening, conveyor belts, everything has to be turned off and on," Gallardo said.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.