An Alaska man has pleaded guilty in exchange for a life prison sentence in the Florida airport shooting that killed five people and wounded six. Esteban Santiago pleaded guilty in Miami federal court Wednesday to 11 charges stemming from the January 2017 attack. 

The 28-year-old Santiago, of Anchorage, Alaska, admitted he opened fire with a handgun in a baggage area at Fort Lauderdale-Hollywood International Airport.

The plea deal was struck after prosecutors announced they wouldn't seek the death penalty. Instead, Santiago agreed to a life prison sentence plus 120 years. The sentence will be officially imposed in August. 

Families and victims will be allowed to speak at the sentencing hearing, reports CBS Miami. Prosecutors say the families and victims of everyone killed and injured have agreed to the plea.

"Today the man responsible for the horrific, devastating, and tragic attack on numerous innocent people at the Fort Lauderdale Airport was held accountable for his crimes," Miami U.S. Attorney Benjamin Greenberg said in a statement.   

An Iraq war veteran, Santiago has been treated for schizophrenia but was found competent to understand legal proceedings. 

 A psychologist testified Wednesday that Santiago's mental state has shown great improvement since he was first arrested.   

"Certainly this is the best I've ever seen him," psychologist Heather Holmes testified. "This is the clearest he's ever been."   

Santiago 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.  

A judge asked Santiago why he did what he did. Santiago initially told the FBI he thought he was under some form of government mind control.

"Um, I don't know. I wasn't really thinking about it at the moment. A lot of things were going on in my mind. Messages," he replied.