A man armed with an assault rifle and pledging loyalty to Islamic State militants killed 50 people during a gay pride celebration at a nightclub in Orlando, Florida, early on Sunday in the deadliest mass shooting in US history, a rampage President Barack Obama denounced as an act of terror and hate.
Police killed the gunman, who was identified as Omar Mateen, 29, a New York-born Florida resident and US citizen who was the son of immigrants from Afghanistan and had twice been questioned by FBI agents in recent years, authorities said.
Mateen's former wife described him as emotionally and mentally disturbed with a violent temper, yet who aspired to be a police officer. He also worked as an armed guard for the security firm G4S, the world's largest, according to the company.
Law enforcement officials probing for evidence suggested the attack was inspired by Islamic State militants, although they said there was no proof that Mateen had worked directly with the group.
As the shooting rampage was unfolding, Mateen "made calls to 911 this morning in which he stated his allegiance to the leader of the Islamic State", said Ronald Hopper, the FBI's assistant special agent in charge on the case.
Shots rang out at the crowded Pulse nightclub in the heart of Orlando, one of the most popular US tourist destinations, as some 350 patrons were attending a Latin music event in conjunction with gay pride week celebrations. Clubgoers described scenes of terror and pandemonium, with one man who escaped saying he hid under a car and bandaged a wounded stranger with his shirt.
"Words cannot and will not describe the feeling of that", Joshua McGill said in a posting on Facebook. "Being covered in blood. Trying to save a guy's life".
The rampage also saw 53 wounded. It ranked as the deadliest single US mass shooting incident, eclipsing the massacre of 32 people at Virginia Tech University in 2007.
"We know enough to say this was an act of terror, an act of hate", Obama said in a speech from the White House. "As Americans, we are united in grief, in outrage and in resolve to defend our people."
US officials cautioned, however, they had no conclusive evidence of any direct connection with any foreign extremist group.
"So far as we know at this time, his first direct contact was a pledge of bayat (loyalty) he made during the massacre," said a US counterterrorism official. "This guy appears to have been pretty screwed up without any help from anybody."
The attacker was carrying an AR-15-style assault rifle and a handgun, Orange County sheriff Jerry Demings said. He also had an unidentified "device", said Orlando police chief John Mina.
The shooting was nearly certain to reignite emotional debates over American gun laws and homeland security in what is shaping up to be a vitriolic US presidential campaign between Democrat Hillary Clinton and Republican Donald Trump.
The attack came six months after a married couple in California - a US-born son of Pakistani immigrants and a Pakistani-born woman he married in Saudi Arabia, fatally shot 14 people in San Bernardino in an attack inspired by Islamic State.
That couple died in a shootout with police hours after their attack on a holiday party attended by the husband's co-workers.
The Florida shooting evolved into a hostage situation, which a team of SWAT officers ended around dawn when they used armoured cars to storm the club before killing the gunman. It was unclear when the victims were killed.
Officials in Orlando, a city of 270,000 people and home to tourist attractions including the Disney World resort, were visibly shocked at the high death toll, which they had initially put at 20.
"We're dealing with something that we never imagined and is unimaginable," Orlando mayor Buddy Dyer said. He said 39 people died inside the club, two outside, and nine others died after being rushed to hospital.
Orlando Regional Medical Center hospital said it had admitted 44 victims, including nine who died, and had carried out 26 operations on victims.
The city began releasing names of the victims on Sunday, with the first seven identified as Edward Sotomayor Jr., Stanley Almodovar, Luis Omar Ocasio-Capo, Juan Ramon Guerrero, Eric Ivan Ortiz-Rivera, Peter Gonzalez-Cruz and Luis Vielma.
Mateen had twice been interviewed by FBI agents, in 2013 and 2014, after making comments to co-workers indicating he supported militant groups, but neither interview led to evidence of criminal activity, Hopper said.
Hopper said Mateen was questioned in 2014 about his contacts with Moner Mohammad Abu-Salha, a US citizen who also had lived in Florida and became a suicide bomber in Syria that year.
Near Boulder, Colorado, Mateen's former wife, Sitora Yusufiy, told reporters he worked for a time as a correctional officer at a detention center for juvenile delinquents in Fort Pierce, Florida, and had once sought admission to a police academy.
She said she had been beaten and otherwise physically abused by Mateen during outbursts of temper in which he would "express hatred towards everything". Eventually, she was "rescued" from Mateen by family members who intervened in a stormy marriage that ultimately ended in divorce, she said.
"I know he had a history of steroids", Yusufiy told reporters outside a home where she was staying with a man she identified as her current fiance. She also described Mateen as "emotionally unstable", "mentally ill" and bipolar.
Deborah Sherman, an FBI spokeswoman in Denver, confirmed that federal agents had interviewed Yusufiy in Colorado.
The imam of the Florida mosque where Mateen attended prayers for nearly ten years described him as a soft-spoken man who would visit regularly but rarely interact with others in the congregation.
CANDIDATES WEIGH IN
Within hours of the shooting, the presumptive presidential nominees of both major political parties weighed in with statements on the tragedy.
Trump, who has called for a temporary ban on Muslims entering the United States, said he was "right on radical Islamic terrorism" and called on Obama to resign because he did not say the words "radical Islam" in his statement responding to the shooting.
Clinton echoed Obama's comments calling the attack both an act of terror and a hate crime, adding that the massacre "reminds us once more that weapons of war have no place on our streets".
If confirmed as an act of terrorism, it would be the deadliest such attack on US soil since September 11, 2001, when al Qaeda-trained hijackers crashed jetliners into New York's World Trade Center, the Pentagon and a field in Pennsylvania, killing some 3,000 people.
The choice of target was especially heart-wrenching for members of the US lesbian, gay, bisexual and transgender community, said LGBT advocacy group Equality Florida.
"Gay clubs hold a significant place in LGBTQ history. They were often the only safe gathering place and this horrific act strikes directly at our sense of safety," the group said in a statement. "We will await the details in tears of sadness and anger."
In an apparently unrelated incident on Sunday, a heavily armed man from Indiana who said he was headed to a Los Angeles-area gay pride festival was arrested in nearby Santa Monica, California, where police found guns and chemicals to make explosives in his car.