Officials say Los Angeles airport security prevented a bloodbath Friday by their swift response to a shooting that left one Transportation Security Administration officer dead and wounded at least two other people.

The suspected gunman, New Jersey native Paul Ciancia, 23, allegedly fired about two dozen shots and caused chaos in Terminal 3 before being shot and captured by airport police. A note in his bag reportedly said he wanted to kill TSA employees and “pigs.” Passengers and others present described stampedes of people running and screaming to escape the area. Some made their way onto the tarmac. Others were said to have remained calm.

Wearing dark clothes, he entered the terminal at about 9.20am local time, took a semi-automatic rifle out of a bag and began shooting at the screening area where security agents check passengers’ travel documents.

He breached the checkpoint and continued shooting as he entered deeper into the airport, prompting what some called a stampede, until police officers chased and cornered him near a Burger King.

The man who died was identified by The Associated Press as Gerardo Hernandez, 39. He suffered stomach and chest wounds. Reuters reported that five people wounded at the scene were taken to hospitals. Terminals 1 and 2 slowly returned to normal Friday evening while Terminal 3 remained closed Saturday.

“A native of Pennsville, New Jersey, he lived in Los Angeles,” The Guardian reported. “Pennsville police chief Allen Cummings said that according to Ciancia’s father, the owner of an auto body shop, the gunman sent a text to a sibling ‘in reference to him taking his own life’ before the attack. Cummings said the Ciancias were a ‘good family’ and that the gunman had no criminal record in New Jersey.”