Authorities say 23-year-old Paul Ciancia walked inside Terminal 3 at LAX and pulled an assault rifle from a bag. NBC's Miguel Almaguer reports.

A man carrying anti-government material and an assault rifle shot his way through security at Los Angeles International Airport on Friday, killing a Transportation Security Administration worker and wounding two others — after sending a suicidal text message to his family, authorities said.

NBC News Paul Anthony Ciancia

The gunman who sent travelers diving for cover and fleeing onto the tarmac — identified by authorities as 23-year-old Los Angeles resident Paul Anthony Ciancia — was shot in the chest by law enforcement and taken into custody in critical condition.

The TSA confirmed the identity of the slain officer as 39-year-old Gerardo I. Hernandez, according to an agency official. Hernandez is the first officer to have been killed in the line of duty in the agency's 12-year history.

Law enforcement officials said at a news conference Friday afternoon that the crime scene is extensive and that authorities are still investigating the suspect's background. While airport terminals 1 and 2 are being reopened, Terminal 3 remains shut down, officials said.

The motive isn't clear, but it's believed the suspect had anti-government views based on written materials he was carrying, the officials said. He texted his brother in New Jersey before the shooting and said he was thinking about killing himself, police told NBC Philadelphia.

Federal officials told NBC News it was unclear whether the gunman was targeting the TSA or was trying to shoot his way farther into the airport. But a witness said the shooter, calmly walking through the terminal with his weapon, approached him with a one-word question.

"All he said was, 'TSA?' Just like that," Leon Saryan told MSNBC.

The shooting started about 9:20 a.m. (12:20 p.m. ET) at Terminal 3, which serves Virgin America and other airlines.

NBC News Authorities believe the gunman used a a .223-caliber semiautomatic assault-style rifle.

The gunman walked through an "exit" lane reserved for passengers leaving the secure area of the airport, pulled the .223-caliber semiautomatic assault-style rifle out of a bag and opened fire at the security checkpoint, officials said.

Related:

As he walked through the terminal, still firing, airport police pursued him. At a cluster of restaurants in the rear of the terminals, near the waiting area for some of the gates, they shot him several times in the chest, law enforcement sources said.

"He's been shot and he's been treated. He survived," Los Angeles Mayor Eric Garcetti said at the news conference.

The mayor added that the suspect had "more than 100 more rounds that could've literally killed everybody in that terminal today."

When the gunfire erupted, travelers who were waiting to snake through the security line suddenly had to abandon their suitcases and hit the ground.

"We were just standing there in line, and somebody started shooting," said Nick Pugh, a witness, who told NBC Los Angeles that he heard eight to 10 shots. "Everyone dropped to the floor and started crawling along the ground."

The shooting brought one of the nation's busiest airports to a standstill.

Eyewitness Leon Saryan talks about his experience at the Los Angeles airport and his interaction with the gunman.

Officials said 746 flights were affected, 46 of which were diverted. The rest were held on the ground in Los Angeles or at their originating airports, said Gina Marie Lindsey, executive director of Los Angeles World Airports. The ground stop applied to airports roughly west of and including Denver, officials said. It was imposed shortly after the shooting began and was lifted at 3 p.m. (6 p.m. ET)

"This has been a trying day for everyone, I know," Lindsey added.

The Federal Aviation Administration grounded flights at LAX, where 1,500 flights take off and land every day. Passengers heading there for departing flights were stuck in colossal traffic jams. Some abandoned their rides and rolled their suitcases the last distance to the airport.

Saryan said he was "cowering in a corner" when the gunman came over and asked whether he was with the TSA, even though he was in street clothes.

"He was calm. He was walking slowly," Saryan said. "He must have felt that he was in control, because he had his weapon and nobody else did at that time.

"But for the grace of God, you know, I would have been one of the fatalities," he said.

The airport said that seven people were injured in all but that the nature of all injuries wasn't clear.

A doctor from Harbor-UCLA Medical Center said two victims were taken there, including Hernandez, who was killed by a round that broke into fragments inside his torso, causing massive bleeding and chest and abdominal injuries.

Shooting suspect Paul Anthony Ciancia carried anti-government written material that was critical of the federal government and the TSA, officials say. NBC's Pete Williams reports.

Dr. David Plurad said that the victim didn't have a pulse when he arrived and that surgeons worked for more than an hour to try to revive him.

"We made every effort to stop the bleeding and get the heart to beat on his own," Plurad said.

The union that represents TSA workers told NBC Los Angeles that Hernandez was a behavioral detention officer who scanned passengers for unusual behavior and had been transferred to Los Angeles from Montana recently.

Another TSA worker was shot in the leg, said Nico Melendez, a spokesman for the TSA.

Brian Adamick, an accountant who was waiting for a flight to Chicago, spoke with a TSA agent with a leg wound on one of the buses that sped to the tarmac to evacuate passengers taking cover there.

"His right ankle is injured and he gets on and sits in the seat next to me, and I said, 'Are you OK?' He said: 'I'm fine. I got shot. Don't worry, I've been shot before,'" Adamick told NBC News in a telephone interview.

"I said, let me take a look, and he pulls up the pant leg and there's a flesh wound — 3 to 4 inches — looks like it's straight out of Hollywood, maybe a drop of blood or two," he said.

Another witness told MSNBC that there was an initial round of shots, then a pause, then more shots. An airline worker told travelers, "Go out! Go out!" and people streamed down the stairs and onto the tarmac for safety, he said.

Former Los Angeles and New York Police Chief Bill Bratton discusses the shooting that killed a TSA worker and wounded others at the Los Angeles airport.

Authorities said the suspect was living in Los Angeles but is originally from Pennsville, N.J., where his parents and brother still reside.

Pennsville Police Chief Allen Cummings said Ciancia texted his brother in the morning and said he was thinking about taking his own life. The family called local police, who alerted Los Angeles police. Officers went to Ciancia's apartment; he wasn't there, but his roommates said everything was fine, Cummings said.

President Barack Obama was briefed on the shooting, the White House said in a statement. Obama called TSA Administrator John Pistole to express his condolences to the family and friends of those injured, including the TSA employee who was killed in the line of duty, a White House official said.

In 2002, an Egyptian national opened fire at the El Al ticket counter at LAX, killing two Israelis before he was shot dead. Authorities ruled it a terrorist incident, even though the shooter was not tied to a known group.

Kristen Welker and Becky Bratu of NBC News contributed to this report.

This story was originally published on