The FBI says a gunman who killed 50 people at a gay nightclub in Orlando, Florida early on June 12 called an emergency police-dispatch operator just before the mass killing and swore allegiance to the so-called Islamic State (IS) militant group.
The FBI identified the gunman responsible for the deadliest mass shooting in U.S. history as 29-year-old Omar Mateen, a U.S.-born citizen of Afghan descent.
Mateen was shot dead by police who stormed into the Pulse nightclub three hours after the killing spree began there.
Police said the attacker carried an assault rifle and a handgun into the nightclub shortly before 2 a.m., started shooting people, and then held a group of club patrons as hostages for three hours before he was killed in a shoot-out.
U.S. President Barack Obama called the attack "an act of terror and an act of hate."
Obama said authorities were "still learning all the facts" and that an investigation was continuing, but authorities had "reached no definitive judgment on the precise motivations of the killer."
Orlando Mayor Buddy Dyer said on June 12 that another 53 people were hospitalized as a result of the attack -- many in critical condition with multiple gunshot wounds.
The Amaq news agency, which supports IS, said the militant group claimed that an IS "fighter" had carried out the shootings.
But it was not immediately clear whether the attacker received instructions and training from IS or was merely inspired by the group's militant, extremist ideology and had acted alone.
U.S. Representative Adam Schiff, the top Democrat on the House Intelligence Committee, said late on June 12 that investigators had not yet found any evidence of direct communication between Mateen and IS or any other international terrorist organization.
Schiff said it was possible that Mateen was self-radicalized but not "under the command and control" of IS.
WATCH: Father Of Orlando Shooter 'Didn't Know He Had Hatred In His Heart'
Mateen, the son of Afghan immigrants to the United States, was born in New York and moved to Florida at a young age with his parents.
He was licensed as a private security officer and had worked for the G4S private security firm in Florida since September 10, 2007.
G4S said in a statement that it was "cooperating fully with all law enforcement authorities, including the FBI, as they conduct their investigation."
Mateen spent his teenage years in Florida, where he went to high school. He also attended two colleges in the state and received a degree in criminal justice.
Mateen married a woman in March 2009 named Sitora Alisherzoda Yusufiy, who was born in Uzbekistan and immigrated to the United States.
They became separated after just a few months and were legally divorced in 2011.
Yusufiy told The Washington Post that she had met Mateen online and moved to Florida, where she lived with him from April to August 2009 in a condominium that was owned by Mateen's parents.
Yusufiy described Matten as an unstable and physically abusive spouse who beat her regularly.
"He would just come home and start beating me up because the laundry wasn't finished or something like that," she told The Washington Post.
The Washington Post also quoted public records showing Mateen had recently been living with a 30-year-old woman named Noor Zahi Saman and that he had a 3-year-old son.
It was not immediately clear whether the two had married. A Facebook profile under the name "Noor Zahi" shows two photos of a woman posing with Mateen and a small boy.
A neighbor who lived near Mateen told The Washington Post that he had seen a woman living with Mateen and a young boy. The neighbor said he never spoke to the woman and that she did not wear conservative Islamic clothing.
Imam Shafiq Rahman, from the Islamic Center of Fort Pierce, Florida, confirmed that Mateen regularly attended prayer services at the mosque with both his father and his son and that Mateen had visited the mosque as recently as June 10.
Rahman told The Washington Post that Mateen was "the most quiet guy" who "never talked to anyone."
He said Mateen "would come and pray and leave," and "there was no indication at all that he would do something violent."
Rahman also said Mateen never sought any spiritual guidance from him.
WATCH: Orlando Killer's Ex-Wife Speaks Of Beatings
The father of the suspect, initially identified in reports as Mir Seddique and later named as Seddique Mateen, said early on June 12 that he believed his son was motivated by hatred of homosexuals -- not by his Muslim religion.
Seddique Mateen said his son got angry when he saw two men kissing in public in Miami several months earlier in front of his 3-year-old son.
"This had nothing to do with religion," Mateen's father told NBC News.
"We are saying we are apologizing for the whole incident," Seddique Mateen said. "We are in shock like the whole country."
Father Backs Taliban vs Pakistan
However, The Washington Post reported later on June 12 that Seddique Mateen holds strong political views that have included what the newspaper described as "support for the Afghan Taliban."
He hosts a television show in the Dari language called the Durand Jirga Show on a channel called Payam-e Afghan, which broadcasts from California.
In one broadcast, available on YouTube, he expressed gratitude toward the Afghan Taliban and criticized Pakistan's government.
Referring to territorial claims that some Afghans have made against Pakistan along the border of the two countries, known as the Durand Line, Mateen's father said: "Our brothers in Waziristan, our warrior brothers in the Taliban movement and national Afghan Taliban, are rising up. Inshallah, the Durand Line issue will be solved soon."
However, RFE/RL's Radio Mashaal notes that in other programs he described the Taliban as slaves and shameless people who kill Afghans and defame Islam.
Mateen's father also once announced a bid to seek the Afghan presidency on his television program.
In a statement, Afghan President Ashraf Ghani condemned the attack, saying that "targeting civilians is not justifiable under any circumstances whatsoever."
"We are sickened and heartbroken by this appalling attack," said Nihad Awad, executive director of a leading Muslim organization in the United States, the Council on American-Islamic Relations.
FBI agent Ronald Hopper said the attacker appeared to "have leanings toward" radical Islamist ideology.
The FBI said its agents twice investigated Mateen but closed those cases after interviewing him.
Hopper said Mateen was first investigated in 2013 after he made inflammatory comments to co-workers alleging possible ties to terrorists.
In 2014, the agency looked into potential ties between Mateen and Moner Mohammad Abusalha, a resident of Fort Pierce, Florida, who carried out a suicide truck-bomb attack in Syria and had appeared in a video released by the Al-Qaeda-linked Al-Nusra Front.
Hopper said the FBI determined that contact between Mateen and Abusalha "was minimal and did not constitute a substantive relationship or a threat at that time."