The gunman who killed at least 50 people in a shooting rampage at an Orlando nightclub has been identified as 29-year-old Omar Mateen. Here is what we know about him so far. (Deirdra O'Regan/The Washington Post)

The gunman who killed at least 50 people in a shooting rampage at an Orlando nightclub has been identified as 29-year-old Omar Mateen. Here is what we know about him so far. (Deirdra O'Regan/The Washington Post)

Sometime after 2 a.m. Sunday, Omar Mateen dialed Orlando’s 911 service to alert the dispatcher to the carnage unfolding at one of the city’s most popular gay bars. He spelled out his full name and location, and then he offered an explanation: He was a follower of the Islamic State.

By 5 a.m., Mateen lay dead, killed in a gun battle with police in a violent finale to the worst mass shooting in U.S. history. But while the enormity of the crime was quickly apparent, authorities were just beginning to sort through the jumble of motives that may have led the 29-year-old immigrant’s son to open fire on scores of young men and women inside the Pulse nightclub.

[Orlando rampage reflects convergence of terrorism and mass shootings]

While Mateen claimed allegiance to Islamic State leader Abu Bakr al-Baghdadi, no evidence had emerged by late Sunday pointing to actual ties to terrorist groups or a significant association with jihadist causes. And although family members said Mateen had expressed anger about homosexuality, the shooter had no record of previous hate crimes.

He had twice come under investigation by the FBI — once for comments suggesting an affinity for Islamist groups, and a second time for vague connections to another Florida man who traveled to Syria to become a suicide bomber. Neither probe turned up evidence of wrongdoing, and Mateen had a blemish-free record when he applied for a Florida license to carry concealed weapons and again when he legally purchased two firearms, including an assault-style semiautomatic rifle, just a few days before the shootings.

Sitora Yusifiy described her ex-husband and Orlando shooter Omar Mateen as "mentally unstable and mentally ill." She said her family "rescued" her from their abusive marriage. (Reuters)

Indeed, as the first day of the investigation neared an end, U.S. officials struggled over how exactly to label the attack, which President Obama described on Sunday as both “an act of terror and an act of hate.”

[50 dead in worse mass shooting in U.S. history]

“We have reached no definitive conclusions,” Obama said at a news conference, adding: “What is clear is that he was a person filled with hate.”

Also clear is the fact that, until the past week, Mateen appears to have lived a relatively quiet life, as a security guard and father of a young son who kept a modest two-bedroom condominium in Fort Pierce, a town on east Florida’s central coast.

Born in New York, he was the son of an Afghan immigrant who moved his family to Florida when Mateen was a child. The older Mateen would eventually open a business and attempt to dabble in Afghan politics from afar, starting a YouTube channel in Florida in which he sometimes expressed favorable views about the Taliban.

Mateen would spend his youth and young adulthood in Florida, attending a local high school and obtaining an associate’s degree in criminal justice from nearby Indian River State College in 2006, according to college spokeswoman Michelle Abaldo. He held jobs as a security guard and appeared to have a fondness for law enforcement, having once talked to friends about becoming a police officer. In a series of Myspace photos, ­Mateen is seen taking selfies wearing New York Police Department shirts.

Florida public records confirm that Mateen had a permit to carry a concealed weapon and was a licensed security guard, first at a facility for juvenile delinquents and later for G4S, a security company.

1 of 38 Full Screen Autoplay Close Skip Ad × The scene in Orlando after a gunman opened fire at a nightclub View Photos Officials say at least 49 people were killed and dozens more were injured in the shooting. Caption Officials say at least 49 people were killed and dozens were injured in the shooting. June 12, 2016 An injured person is carried out of Pulse nightclub in Orlando. Steven Fernandez/Associated Press Buy Photo Wait 1 second to continue.

But there also were early signs of emotional trouble and a volatile temper, according to Sitora Yusifiy, who was briefly married to Mateen. Yusifiy described Mateen as an abusive husband who beat her repeatedly while they were married.

“He was not a stable person,” she told The Washington Post. “He beat me. He would just come home and start beating me up because the laundry wasn’t finished or something like that.”

[‘It was just complete chaos’: survivors on the struggle to stay alive]

Yusifiy said she met ­Mateen through an online dating service and eventually agreed to move to Florida to be with him. The two married in March 2009 and moved into the Fort Pierce condo that Mateen’s family owned.

“He seemed like a normal human being,” said Yusifiy, who divorced Mateen in 2011.

Acquaintances gave conflicting views about Mateen’s religiosity. Yusifiy said her former husband wasn’t very devout and preferred spending his free time working out at the gym. She said in the few months they were married he gave no signs of having fallen under the sway of radical Islam.

“He was a very private person,” she said.

Mateen later had a son with another woman who also appears to have left him and declined to comment when reached at her current home.

But one friend said Mateen became steadily more religious after his divorce and went on a religious pilgrimage to Saudi Arabia.

“He was quite religious,” said the friend, who also spoke on the condition of anonymity. Yet, he added, if Mateen had sympathies for the Islamic State or other terrorist groups, he never mentioned them.

For several years, Mateen regularly attended the Islamic Center of Fort Pierce and was there as recently as two days ago, said Imam Shafiq Rahman on Sunday.

The imam said Mateen’s father and young son would pray with him, and Mateen’s three sisters were active volunteers at the mosque, which had about 150 congregants.

“He was the most quiet guy; he never talked to anyone,” Rahman said, gripping a loop of black and red prayer beads as he held forth in a dingy corridor adorned with images of the Arabic alphabet rendered by children who come here for religious instruction. “He would come and pray and leave. There was no indication at all that he would do something violent.” Mateen never sought any spiritual guidance from him, Rahman said.

But Rahman’s 20-year-old son, a University of Florida senior who declined to provide his first name, recalled Mateen as an “aggressive person.”

“It was just his demeanor,” he said. “He used to work out a lot.”

[Another national tragedy drives Americans further apart]

Mateen’s father, Seddique ­Mateen, insisted in interviews Sunday that his son’s violent deeds had nothing to do with religion. He said Mateen had become enraged a few months earlier at the sight of a pair of gay men being affectionate with each other.

“We were in downtown Miami, Bayside, people were playing music. And he saw two men kissing each other in front of his wife and kid and he got very angry,” the father told NBC News. “They were kissing each other and touching each other and he said, ‘Look at that. In front of my son they are doing that.’ ”

Seddique Mateen had himself become embroiled in controversy as the host of the “Durand Jirga Show” on a channel called Payam-e-Afghan, which broadcasts from California. In it, the elder Mateen speaks in the Dari language on a variety of political subjects. Dozens of videos are posted on a channel under Seddique Mateen’s name on YouTube. A phone number and post office box that are displayed on the show were traced back to the Mateen home in Florida. Mateen also owns a nonprofit organization under the name Durand Jirga, which is registered in Port St. Lucie, Fla.

In one video, the elder Mateen expresses gratitude toward the Afghan Taliban, while denouncing the Pakistani government.

“Our brothers in Waziristan, our warrior brothers in [the] Taliban movement and national Afghan Taliban are rising up,” he said. “Inshallah the Durand Line issue will be solved soon.”

It is unclear if his statements ever attracted the attention of the FBI.

The Durand Line was drawn as a demarcation of British and Afghan spheres of influence in 1893. The historical line is a source of conflict for members of the Pashtun ethnic group, whose homeland straddles the border between Afghanistan and Pakistan.

Just hours before the Orlando shooting, Seddique Mateen posted a video on a Facebook page called “Provisional Government of Afghanistan — Seddique ­Mateen.” In it, he seems to be pretending to be Afghanistan’s president, and he orders the arrest of an array of Afghan political figures.

“I order national army, national police and intelligence department to immediately imprison Karzai, Ashraf Ghani, Zalmay Khalilzad, Atmar, and Sayyaf. They are against our countrymen, and against our homeland,” he says, while dressed in army fatigues.

William Wan, Steve Friess and Brian E. Crowley in Fort Pierce, Fla., and Julie Tate, Jennifer Jenkins and Alice Crites in Washington contributed to this report.

Read more:

Dozens hurt in ‘domestic terror incident’; suspect identified