The 2013 rampage began at a TSA checkpoint in Terminal 3, where Paul Ciancia killed a 39-year-old father

Receive the latest national-international updates in your inbox

Paul Ciancia (inset) is suspected of killing a TSA officer and wounding two other people at a security checkpoint at Los Angeles International Airport on Friday.

A gunman accused of killing a TSA officer at Los Angeles International Airport three years ago has agreed to plead guilty to murder in a deal that spares his life.

Paul Ciancia, 26, faces a mandatory life sentence for murder and other penalties, according to the plea agreement filed Thursday in U.S. District Court that calls for him to plead guilty to all charges.

His trial was scheduled to begin early next year in the death penalty case, but due to the plea agreement, prosecutors won't seek death. The native of Pennsville, New Jersey, who was living in Sun Valley, California, at the time of the shooting had pleaded not guilty.

An 11-count indictment against him includes charges of murder of a federal officer, use of a firearm that led to the murder and act of violence in an international airport.

Inside the LAX Mayhem

The Nov. 1, 2013, LAX rampage began at a TSA checkpoint in Terminal 3, where Ciancia pulled a semi-automatic rifle from a duffel bag and opened fire, killing TSA agent Gerardo Hernandez, a 39-year-old father. Ciancia began walking upstairs but returned when he realized Hernandez was still alive and shot him again, according to court documents that cited witness statements.

The gunman then shot two more agents and an airline traveler before he was wounded by gunfire from officers in the terminal, authorities said. He was carrying dozens of rounds of ammunition and a handwritten note that stated he wanted to kill TSA agents and "instill fear in their traitorous minds," according to authorities.

U.S. District Judge Philip S. Gutierrez previously said jury selection could start on Feb. 23, 2016.