Over 20,000 international passengers, both Americans and foreigners, sat in four airport terminals and in 60 planes starting about 2 p.m. on Saturday, when the computer system broke down, said Los Angeles World Airports spokesman Paul Haney.
A major switch in the system, which contains names of arriving passengers and law enforcement data about them, including arrest warrants, had failed and had to be replaced, said Mike Fleming, a U.S. Customs and Border Protection spokesman.
"That system allows our officers to make decisions on who we can allow to enter the United States," Fleming said. "You just don't know by looking at them."
The computers were fully restored at 11:45 p.m., and the last of backlogged passengers were processed by early Sunday, Fleming said.
"This is probably one of the worst days we've had. I've been with the agency for 30 years and I've never seen the system go down and stay down for as long as it did," Peter Gordon, acting port director for customs, told The Los Angeles Times.
Officials diverted seven incoming flights to an Ontario airport and advised international passengers departing Sunday to check the status of their flights before leaving for the airport.
Terminals that normally accept international passengers were full by 2:30 p.m. Saturday, and passengers arriving afterward had to remain on the runway until their was room inside the terminal buildings.
Three people were transported to local hospitals after they fell ill from waiting in the terminals, according to the Los Angeles City Fire Department.
"This is just unbearable," said Gaynelle Jones, 57, who landed on a 13-hour flight from Hong Kong at about 2:15 p.m. and was still sitting on her plane five hours later. She said she had missed her connecting flight to Houston.
"We've already been on a plane for several hours, and they have no time frame for when we'll be able to get off," Jones said during a cell phone interview.
Airport officials said the stranded planes were connected to ground power and passengers had access to food, water and bathrooms.
"People are getting a little stir-crazy, feeling claustrophobic," said Chris Cognac, 39, who was returning with family and friends -- including 10 children -- from a week in Puerto Vallarta. The group had been sitting on the tarmac for five hours when he spoke by phone.