Follow CBSMIAMI.COM: Facebook | Twitter

FT LAUDERDALE (CBSMiami) – Prosecutors have decided not to seek the death penalty against a man accused in a deadly shooting rampage inside Ft. Lauderdale-Hollywood International Airport.

READ MORE: Centner Academy Reverses Course On 30-Day Quarantine For Vaccinated Students

In a court proceeding Tuesday, lawyers for Esteban Santiago said he will plead guilty under certain conditions.

“The defense made a plea offer that the defendant would plead guilty and accept a sentence of life without parole in exchange for the death penalty being waived,” said Assistant U.S. Attorney Ricardo Del Toro.

Santiago pleaded not guilty to a 22-count indictment in the January 6, 2017 shooting in a baggage area of the airport. Authorities say he retrieved a 9mm handgun he had taken on a flight in checked luggage, loaded it in a bathroom and came out firing randomly in the crowded terminal. He killed five people and injured six others.

Before considering the plea deal, Del Toro said they contacted each of the victims’ families.

“Avoiding a trial, with this plea, is in the best interests of all the families involved,” said assistant U.S. Public Defender Eric Cohen.

READ MORE: Pembroke Pines Police Say No Credibility In Viral Online School Threat

After the shooting, the FBI says Santiago told agents he acted under government mind control, then claimed inspiration by Islamic State extremists. No terrorist links were found.

The FBI says numerous airport security cameras captured the shooting on video and there are dozens of witnesses who can identify Santiago as the shooter.

Santiago, a National Guard Iraq war veteran, was briefly hospitalized in Alaska about two months before the airport shooting after complaining of mental problems but was released with no restrictions on possessing a gun.

Before signing off on the deal, U.S. District Judge Beth Bloom ordered an evaluation for Santiago to make sure he is competent to take a life in prison plea deal.

“This court has an obligation to ensure that Mr. Santiago has the ability to knowingly and competently enter a plea and waive his rights,“ said Judge Bloom.

There will be a competency hearing on May 23rd.

MORE NEWS: ‘I Was Very Concerned’: State Sen. Tina Polsky On Masking Incident Involving Florida’s New Surgeon General

(© Copyright 2017 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)