ORLANDO (MEDIA GENERAL) — Omar Mateen is the man responsible for killing 49 people at a gay nightclub in Orlando, Florida, in what is now the deadliest mass shooting in U.S. history.

Mateen, 29, lived in Port St. Lucie, Florida. He was an American citizen born in New York. His family is from Afghanistan.

He opened fire at Pulse Nightclub shortly after 2 a.m. Sunday. Forty-nine people were killed and 53 more injured. Mateen was also killed.

Mateen was a body builder and worked as a private security guard in Florida. He was a religious man who attended the local mosque and who at one point expressed interest in becoming a police officer, though he never pursued it.

Inspired by extremists

President Barack Obama said Monday it appears Mateen was “inspired by extremists over the internet” but there is no clear evidence he was directed externally or his acts were part of a larger plot.

Obama called the attack an apparent example of “homegrown extremism” that U.S. officials have been worrying about for years.

In speaking with reporters, FBI Director James Comey said Mateen had “strong indications of radicalization.”

He said Mateen spoke with a 911 operator three times early Sunday morning and pledged loyalty to the head of the Islamic State group on his last call.

Past FBI investigations

The FBI twice investigated Mateen, but closed those cases after interviewing him.

Director Comey said they first learned of Mateen in May of 2013.

He was working as a contract security guard at a local courthouse when he made some statements about terrorism, calming ties to al-Qaida that concerned co-workers.

Mateen was interviewed and claimed he did it in anger because his co-workers were teasing him because he was Muslim and after 10 months, the FBI closed its investigation.

Two months later, in 2014, the FBI looked into potential ties connecting Mateen to Moner Mohammad Abusalha, the first American to carry out a suicide attack in Syria. Like Mateen, Abusalha lived in Fort Pierce, Florida.

At that time, agents determined that contact between the two was minimal and did not constitute a substantive relationship or a threat.

Guns

Mateen bought at least two guns legally within the last week or so, according to Trevor Velinor of the Bureau of Alcohol, Tobacco and Firearms.

He exchanged gunfire with 14 police officers at the club and took hostages at one point. In addition to the assault rifle and handgun, he had a weapon in his vehicle, police said.

Past violence

Mateen has no criminal record. However, his ex-wife says he beat her repeatedly while they were married.

Sitora Yusufiy told The Washington Post that she met Omar Mateen online about eight years ago and decided to move to Florida and marry him. She said at first the marriage was normal, but then he became abusive.

Yusufiy told reporters in Boulder, Colorado, her ex was also bipolar.

“He was mentally unstable and mentally ill,” Yusufiy said.

They were together for only a few months and her parents intervened when they learned Mateen had assaulted her..

Yusufiy said she was “devastated, shocked, started shaking and crying” when she heard about the shooting, but she attributed the violence to Mateen’s mental illness, not any alliance with terrorist groups.

A former Florida police officer who says he once worked with Mateen described him as “unstable and unhinged.”

Daniel Gilroy told multiple news outlets that he worked with Mateen at the G4S security company. Gilroy called him an angry, loud, profane man who used slurs for gay people, blacks, Jews and women.

Gilroy told The New York Times, “He talked about killing people all the time.”

Gilroy said he wasn’t surprised when he learned of the massacre: He said, “I saw it coming.”

Religion

Three to four times a week, Mateen attended evening prayer services at the Islamic center of Fort Pierce, most recently with his young son, said Iman Syed Shafeeq Rahman.

Although he was not very social, he also showed no signs of violence, Rahman said. He said he last saw Mateen on Friday.

“When he finished prayer he would just leave,” Rahman told The Associated Press. “He would not socialize with anybody. He would be quiet. He would be very peaceful.”

Rahman doesn’t think the attack was political or due to anti-American sentiment, though. He said it was more likely the result of psychological issues Mateen may have had.

“My personal opinion is that this has nothing to do with ISIS,” he said.

Rahman said he knew Mateen and his family since the shooter was a young boy. Playful as a child, he became more serious as an adult, Rahman said. He was not, as far as the iman could see, someone who would ever commit such a gruesome act of mass violence.

Suspect’s father

Mateen’s father has called his son’s massacre “the act of a terrorist” said the attack goes against his principles and everything he taught his son.

In a statement to reporters from his home in Port St. Lucie, Florida Monday, Seddique Mir Mateen said the family is shocked by what happened and that if he’d known what his son was planning, he would have arrested him himself.

On Sunday, the father suggested that his son’s anti-gay hatred may have led to the rampage, saying his son got angry a few months ago when he saw two men kissing in Miami.

Mateen apologized for what his son did and said “I am as sad and mad as you guys are.”

He wouldn’t go into details about any religious or political views his son held, saying he didn’t know.

Seddique Mir Mateen is a life insurance salesman who started a group in 2010 called Durand Jirga, Inc., according to Qasim Tarin, a businessman from California who was a Durand Jirga board member. The name refers to the Durand line, the long disputed border between Afghanistan and Pakistan.

Tarin said Seddique Mir Mateen had a television show on which they discussed issues facing Afghanistan.

“It’s shocking,” he said about the shooting. “I don’t think it has anything to do with ISIS. (Omar Mateen’s) father loves this country.”

But a former Afghan official said the “Durand Jirga Show” appears on Payam-e-Afghan, a California-based channel that supports ethnic solidarity with the Afghan Taliban, which are mostly Pashtun. Viewers from Pashtun communities in the United States regularly call in to the channel to espouse support for Pashtun domination of Afghanistan over the nation’s minorities, including Hazaras, Tajiks and Uzbeks, the official said.

The “Durand Jirga Show” expresses support for the Taliban, has an anti-Pakistan slant, complains about foreigners in Afghanistan and criticizes U.S. actions there, the official said. Seddique Mir Mateen lavished praise on current Afghan President Ashraf Ghani when he appeared on the show in January 2014, but he has since denounced the Ghani government, according to the official, who said that on Saturday, Seddique Mateen appeared on the show dressed in military fatigues and used his program to criticize the current Afghan government. He also announced on that show that he would run in the next Afghan presidential election, said the official, who spoke only on condition of anonymity because he did not want to be linked to coverage of the shooting.The Associated Press, The Washington Post and NBC News contributed to this report.