When the shooting stopped, a Transportation Security Administration officer was dead. Gerardo I. Hernandez, 39, became the first TSA officer in the agency's 12-year history to be killed in the line of duty.
Five other people were hurt, including two other TSA employees and the gunman, identified as Paul Ciancia, 23, of Pennsville, N.J. He was shot four times by airport police and remained hospitalized but there was no word on his condition.
Ciancia apparently had been living in Los Angeles for about 1 1/2 years, authorities said.
As gunshots rang out in Terminal 3 on Friday morning, swarms of passengers screamed, dropped to the ground or ran for their lives.
Leon Saryan, 65, had just passed through security and was looking for a place to put his shoes and belt back on when he heard gunshots. He fled with a TSA worker, who he said was later wounded slightly, and managed to hide in a store. As he was cowering the corner, the shooter approached.
"He looked at me and asked, 'TSA?' I shook my head no, and he continued on down toward the gate. He had his gun at the ready and but for the grace of God I am here to tell about it," said Saryan, of Milwaukee.
As Saryan was fleeing for his life, others were hiding behind ticket counters and under tables.
"I really thought I saw death," said Anne Rainer, who witnessed the gunfire with her 26-year-old son Ben. The pair were about to leave for New York so her son could see a specialist for a rare genetic condition he has.
They took refuge behind a ticket counter where she said people prayed, cried and held hands. She watched as one person jumped from a second-floor balcony to get away from the gunman.
"Adrenaline went through my head, my body went numb, and I said, 'If I have to go, it's OK because I'm not going to feel it, but I have to save him,'" Rainer said.
Nick Pugh had just handed his driver's license and boarding pass to a TSA screener and was about to walk toward a metal detector when the shooting began. He dove to the floor. Watching panicked people trying to crawl over one another, Pugh got up and bolted through an emergency exit door and onto the airport tarmac.
"I thought with all of the terrorism we've had, get away from the terminal where everyone is," Pugh said. "If there's a lot of people shooting or a bomb, get away from where everybody else is. I just ran."
Others fled into the terminal, taking refuge in coffee shops and lounges as the gunman shot his way toward them. However, some witnesses and authorities said the gunman ignored anyone except TSA targets.
Airport police officers shot the gunman four times, including in the mouth and leg, during a shootout in front of a Burger King in the terminal.
A law enforcement official said the gunman was dressed in fatigues and carried at least five full 30-round magazines of ammunition. In his bag he had a one-page, handwritten note that said he wanted to kill TSA employees and "pigs."
The official, who was not authorized to discuss the investigation publicly and spoke on condition of anonymity, said the note referred to how the gunman believed his constitutional rights were being violated by TSA searches and that he was a "pissed-off patriot" upset at former Homeland Security Secretary Janet Napolitano.
On Friday, Ciancia's father in New Jersey had called authorities for help in finding his son after the young man sent one of his siblings a text message about committing suicide, Pennsville Police Chief Allen Cummings said.
The chief said he called Los Angeles police, who sent a patrol car to Ciancia's apartment. There, two roommates said that they had seen him a day earlier and he had appeared to be fine.
Cummings said that the Ciancias owners of an auto body shop are a "good family" and that his department had had no dealings with the son.
People who knew Ciancia said they were shocked that he was the alleged gunman.
Ciancia's former roommate in Los Angeles, James Mincey, said he appeared to be unemployed but never showed any disturbing qualities, such as a fascination with guns.
He spoke to Ciancia last week.
"He said he was going back to Jersey, going to work for his dad, and making amends with family problems ... and spending holidays with his family," Mincey told KABC-TV.
Ciancia had been into a next-door restaurant called The Morrison several times, owner Marc Kreiner said.
"He was kind of a quiet guy, came in mostly by himself," Kreiner told the Los Angeles Times.
The attack at the nation's third-busiest airport began around 9:20 a.m. when the gunman pulled the assault-style rifle from a bag he had carried into the terminal, which serves such airlines as Virgin America, AirTran, Horizon Air and JetBlue.
Airport police were running after the gunman within seconds of the first shots being fired, Chief of Airport Police Patrick Gannon said.
The airport was locked down and its normally packed roads were emptied of cars. Across the U.S., aviation officials stopped LAX-bound flights from taking off from other airports, causing delays around the country. Some Los Angeles-bound flights that already were in the air were diverted elsewhere.
Throughout the day, an estimated 1,550 scheduled arriving and departing flights with around 167,000 passengers were affected, according to the airport. That included 86 arriving flights that were diverted to other airports.
After the first attack police, unsure whether the gunman acted alone, escorted travelers out of Terminal 3 as they searched for other possible shooters.
Pugh, who had fled onto the tarmac so quickly he had left his ID behind, was briefly handcuffed until it was determined he wasn't involved.
Rainer and her son were escorted to safety two terminals away, but they left behind their baggage, which included her son's oxygen and feeding tube machine.
Some travelers arriving for flights were held several miles away for hours. When the airport slowly began to reopen late in the afternoon, people by the thousands, many wheeling suitcases, walked down the middle of the four-lane ring road fronting the terminals.
Hernandez, the officer who was killed, was one of the TSA's behavioral detection officers who are stationed throughout the airport looking for suspicious behavior, said J. David Cox Sr., national president of the American Federation of Government Employees.
Friends and neighbors remembered the Los Angeles man as a doting father of two and a good neighbor who went door-to-door warning neighbors to be careful after his home in the Porter Ranch area of Los Angeles was burglarized.
"It's devastating because he was such a great guy," Kevin Maxwell, a friend and former TSA co-worker at the airport, told KNBC-TV. "All he talked about was his family. He was very proud of his son, who played football."
He also had a daughter, Maxwell said.
"No words can explain the horror that we experienced today," TSA Administrator John Pistole said in a message to employees Friday.
Pistole said he planned to arrive in Los Angeles on Saturday to meet with Hernandez's family and the injured employees.
President Barack Obama called the head of the Transportation Security Administration to express his condolences to the families and friends of the dead and injured TSA officers.
In all, five people were taken to hospitals. They included Hernandez, Ciancia, the two wounded TSA officers, and a person who suffered a broken ankle during the chaos. A sixth person was treated at the scene for ringing in the ears from gunfire, the Los Angeles Fire Department said.
Among the people evacuated from the airport, more than dozen were treated for minor injuries such as twisted ankles, exhaustion or stress.
It was not the first shooting at LAX. On July 4, 2002, a limousine driver opened fire at the airport's El Al ticket counter, killing an airline employee and a person who was dropping off a friend at the terminal. Police killed the man.