Fifty people were killed and at least 53 people were wounded when a gunman armed with an assault rifle and a handgun opened fire inside a downtown Orlando nightclub about 2am local time in the deadliest mass shooting in US history.
Islamic State's Amaq news agency says the Islamist militant group was responsible for the shooting.
"The armed attack that targeted a gay nightclub in the city of Orlando in the American state of Florida which left over 100 people dead or injured was carried out by an Islamic State fighter," Amaq said.
The gunman, identified as Omar Mateen, 29, an American citizen whose parents are from Afghanistan, called emergency services shortly before the attacks and pledged allegiance to Islamic State, officials said.
President Barack Obama described the mass shooting as "an act of terror" and "an act of hate", saying it was an attack on all Americans.
Mateen had been on police's "radar," ABC News reported. Mateen's father, Mir Seddique, told NBC News his son had become angry a couple of months ago when he saw two men kissing in Miami, and he believed that could be related to the shooting.
"We are saying we are apologising for the whole incident. We weren't aware of any action he is taking. We are in shock like the whole country," Seddique said.
Investigators said they "have suggestions the individual has leanings towards (Islamic terrorism), but right now we can't say definitely," said Ron Hopper, assistant special agent in charge of the FBI's Orlando bureau.
It later emerged that the shooter's father Mir Seddique hosts a TV show in which he has spoken of support for the Taliban. In a recent video from the 'Durand Jirga Show' on a channel called Payam-e-Afghan, Seddique appears to portray himself as president of Afghanistan.
Orlando mayor Buddy Dyer declared a state of emergency after the number of casualties came to light on Sunday morning.
The gunman was found dead inside the Pulse nightclub, one of the largest in Orlando, about 5am after a shootout with the police, Orlando Police Chief John Mina said.
The shooting began inside the club, the chief said, and continued outside when an officer working at Pulse attempted to confront him. The gunman then went back into the club, resumed shooting and took hostages.
At 5am, Mina said, the police decided to rescue the hostages. They broke down a door with an armored vehicle and detonated a "controlled explosion", helping some 30 patrons flee to safety, Mina said.
The gunman was shot by police.
At least nine officers were involved in the shooting with the gunman. One of them was slightly injured, the authorities said.
"It's just shocking," Christopher Hansen, who was inside Pulse, told CNN.
Hansen was getting a drink at the bar when he "just saw bodies going down," he said.
He said the gunshots, "just one after another after another, could have lasted a whole song.
When the shots erupted, he dropped to the ground and was crawling on his elbows and knees, before he spotted a man who had been shot.
"I took my bandana off and shoved it in the hole in his back," Hansen said, adding that he saw another woman who appeared to be shot in the arm.
Carmen Pena, 30, said he was inside the club, in the same room with the gunman, when the shooting began.
"I know that he was in the room, because I heard a woman screaming, and then all of a sudden she stopped," Pena told People Magazine.
"The gunshots were so loud. It felt like they were right next to my ears. Every second, I thought I was going to be hit."
The mass slaughter comes in the middle of a heated US presidential election.
Republican candidate Donald Trump, who has advocated a ban on Muslim immigration to the US, crowed that the nightclub attack vindicated his position.
"Appreciate the congrats for being right on radical Islamic terrorism, I don't want congrats, I want toughness & vigilance," Trump tweeted. "We must be smart!"
Presumptive Democratic nominee Hillary Clinton, who has pledged to tighten up gun control, said the attack "reminds us once more that weapons of war have no place on our streets."
She also described the attack as an "act of terror" as well as "an act of hate" against the lesbian gay bisexual and transgender (LGBT) community.
The police called it a "mass casualty" event. The wounded were taken to three area hospitals.
The shooting was described as a "domestic terror incident" by Sheriff Jerry Demings.
The shooter was carrying an assault rifle and a handgun, and wearing what Chief Mina described as "some type of device".
Earlier, unconfirmed reports suggested at least one suspect was barricaded inside in a chaotic late-night incident.
During the chaotic attack, a message on a Facebook account for the Pulse club instructed "Everyone get out of pulse and keep running" several hours ago.
Emergency vehicles descended on the area of the Florida city, as patrons of the club posted frantic warnings online.
One witness heard "what sounded like a semi-automatic firearm inside the nightclub and outside the south Orlando venue from a vehicle."
The man, Anthony Torres, told the Daily News: "We were just leaving the club and we started hearing the shots".
"Everyone was running and screaming."
Afterwards, Torres returned to the club and saw medics putting a number of victims into an ambulance with more victims laid out on the parking lot near the club.
The shooting comes days after 22-year-old The Voice singing star Christina Grimmie was gunned down at a meet-and-greet event in the Florida city of St Petersburg.
Prior to this massacre, the deadliest shootings in US history were at Virginia Tech in 2007 and Sandy Hook Elementary School in 2012, with 32 and 27 killed.
Sign up for our newsletter to stay up to date.