The man suspected of killing five people and wounding eight others when he opened fire at the Fort Lauderdale-Hollywood International Airport had a life that appeared to have been unraveling for a year.

In January 2015, Esteban Santiago was arrested by police in Anchorage, Alaska, for beating up his girlfriend and was ordered to stay away from her.

In August, he was kicked out of the Alaska Army National Guard for “unsatisfactory performance.”

And according to CNN, he went to the FBI in Anchorage a few months ago, claiming that he was hearing voices telling him to join the Islamic state group terrorist organization.

The 26-year-old, who grew up in Puerto Rico, is now in the custody of the FBI, whose agents are trying to determine his motives for the attack and why he chose Fort Lauderdale, where he has no apparent ties, to carry it out.

According to the Alaska Dispatch News, FBI agents also searched his home in Anchorage, and also went door to door at an Anchorage hotel.

His family said Santiago, who had been in and out of the military for nearly a decade, started having problems after returning from a tour in Iraq in 2011.

"Like, a month ago, it was like he lost his mind," his aunt, Maria Ruiz, told reporters for NorthJersey.com, which represents a group of New Jersey newspapers. "He said he saw things."

She said Santiago had a son in September and seemed happy about becoming a father.

“I don’t know why this happened,” she said.

Santiago's brother told NBC News that he was "receiving psychological counseling in Anchorage," where he was working in security. But he wasn't violent, he said.

“He was pro-America,” Bryan Santiago said. “He is a regular person, spiritual, a good person.”

Although he was born in New Jersey, Santiago grew up in Puerto Rico, his brother said. His brother and mother still live there.

He then joined the Army Reserves, and in November 2014 joined the Alaska National Guard as a combat engineer, typically working one weekend a month and spending another 15 days in training each year.

The first public signs of trouble came in February 2015, when he was evicted for not paying his rent, according to Alaska court records.

Then in January 2016, he was arrested and charged with two misdemeanors for a fight with his girlfriend, according to the Alaska Dispatch News.

Santiago’s girlfriend called police and said he was angry and “was yelling at her while she was in the bathroom,” according to the paper. He smashed the door off the frame, cursed her, tried to strangle her and smacked her on the side of the head, the girlfriend said, according to the paper.

Officers didn’t see any injuries, but he was ordered to stay away from her. A month later, police found him again at the girlfriend’s house, violating the order. Prosecutors eventually dropped the charges.

By August, he’d been kicked out of the Alaska National Guard, possibly for not showing up, according to CNN.

A couple of months ago, after he went to the FBI office in Anchorage claiming to hear voices, he was taken to a hospital for a mental health evaluation and checked himself in.

Then, on Friday, he legally put his handgun and ammunition in a checked bag and boarded a flight from Anchorage to Minneapolis. He switched planes there and continued to Fort Lauderdale.

Then, shortly after 1 p.m. in the airport’s baggage claim in Terminal 2, he pulled the gun out of his bag and started shooting.