A gunman who pledged allegiance to the Islamic State opened fire inside a crowded gay bar and dance club, leaving 50 people dead and 53 injured in the deadliest mass shooting in US history.

President Obama labelled the rampage "an act of terror and an act of hate."

The gunman fired bullets seemingly at random inside the popular Pulse nightclub, forcing panicked patrons to dive onto the dance floor, crawl across the ground and scramble out a back entrance. He then held others hostage in a three-hour siege that ended when police stormed the building and killed him.

STEVE NESIUS/REUTERS Friends and family members embrace outside the Orlando Police Headquarters.

Witnesses described scenes of horrific carnage. Victims flooded local hospitals with gunshot wounds to their chests, legs and arms. Some had their calves and forearms blown off, doctors said.

READ MORE:

* Who was the Florida shooter?

* Agonising wait for families

* Gunman referenced Boston Marathon bombers, says official

* Obama: 'We will not give in to fear'

* Harrowing accounts from survivors

Police said the toll could have been even greater had a SWAT team not rescued 30 people and shepherded them to safety. Many of the victims were Latino; the club was celebrating "Latin Night."

REUTERS A witness describes hearing gunshots, screams and then seeing blood at a Florida nightclub shooting that left at least 50 people dead and 53 injured.

"We're dealing with something we never imagined and is unimaginable," said Orlando Mayor Buddy Dyer, D, who declared a state of emergency in the city.

The gunman was identified as Omar Mateen, a 29-year-old security guard who was born in New York to Afghan parents.

After his initial assault on the dance club, Mateen called 911 and pledged allegiance to the leader of the Islamic State, also known as Isis, according to US law enforcement officials, who spoke on the condition of anonymity because the FBI investigation is unfolding.

MYSPACE Omar Mateen's family say they had no idea he was planning an attack.

During the call, Mateen made reference to the 2013 bombing of the Boston Marathon, officials said.

VICTIMS NAMED

City of Orlando officials has started releasing the names and ages of shooting victims whose next of kin have been contact.

CARLO ALLEGRI/REUTERS Police forensics investigators work at the crime scene.

So far the following names have been released: Edward Sotomayor Jr, 34; Stanley Almodovar III, 23; Luis Omar Ocasio-Capo, 20; Juan Ramon Guerroro, 22; Eric Ivan Ortiz-Rivera, 36; Peter O Gonzalez-Cruz, 22; Luis S. Vielma, 22; Kimberly Morris, 37; Eddie Jamoldroy Justice, 30; Darryl Roman Burt II, 29; Deonka Deidra Drayton, 32; Alejandro Barrios Martinez, 21; Anthony Luis Laureanodisla, 25; Jean Carlos Mendez Perez, 35; Franky Jimmy Dejesus Velazquez, 50.

The list will be periodically updated on www.cityoforlando.net/blog/victims/ as those who died are identified and families and loved ones notified.

FEARS FOR LGBT COMMUNITY

SMH Raw vision purportedly taken outside Pulse nightclub in Orlando, as police appear to exchange fire with at least one shooter.

The shooting raised fresh alarm about the ability of overseas terrorists to wreak havoc on US soil. But it also ignited fears of a broader campaign against the American gay, lesbian and transgender community as the first anniversary of the landmark Supreme Court decision legalising same-sex marriage approaches.

In Washington, police stepped up patrols ahead of the Capital Pride Festival, one of dozens of gay pride events scheduled this month across the nation and around the world.

"As Americans, we are united in grief, in outrage, and in resolve to defend our people," Obama said during a brief speech at the White House, where he said the FBI is investigating the Orlando massacre as an act of terrorism.

Pulse nightclub in Orlando, Florida, posted this message on social media.

Until Sunday, the 2007 rampage at Virginia Tech - in which 32 people died - was the country's worst mass shooting.

STEVE NESIUS/REUTERS At least 50 people were killed in the shooting.

FAMILIES WAIT FOR NEWS

Throughout the day, relatives and friends of missing clubgoers gathered at a downtown Hampton Inn & Suites to await news of their loved ones. On Sunday evening (local time), as the names of the dead began to trickle out, the scene in the hotel's sweltering lobby turned tragic.

KEVIN KOLCZYNSKI/REUTERS Police lock down Orange Avenue around Pulse nightclub after the gunman's attack.

One woman sat in a chair next to a stack of pizza boxes, sobbing and screaming. Another woman crumpled in her chair, crying, and was taken out in a wheelchair. A third woman vomited into a trash can. Others hugged, shook and softly cried as grief counsellors and law enforcement officials milled about.

FACEBOOK SAFEY CHECK

Facebook has activated its Safety Check feature following a mass shooting in Orlando, the worst in US history.

STEVE NESIUS/REUTERS Officers arrive at the Orlando Police Headquarters after the attack.

The feature allows users to mark themselves as safe in an emergency situation, or friends of people in the area of a natural disaster or other crisis.

A heavily-armed gunman opened fire on a crowded nightclub in Orlando on Sunday, killing 50 people.

Facebook first used the Safety Check in 2014, focusing on natural disasters including earthquakes in Chile and Nepal. Last year's attacks in Paris marked the first time Facebook used Safety Check for a crisis that was not a natural disaster. The Safety Check was also used in March after the terror attacks in Brussels.

CARLO ALLEGRI A man puts his hand print on a makeshift memorial on the ground near the Pulse gay nightclub.

NZ PAYS TRIBUTE

New Zealand's Prime Minister John key has written to Barack Obama to express condolences for Orlando shooting.

Meanwhile, the Michael Fowler Centre in Wellington was being dressed in multicoloured lights on Monday.

STEVE NESIUS An Orlando resident wears an "Orlando Strong" T-shirt during a vigil at Lake Eola Park for victims.

A Wellington City Council spokesman said Wellington mayor Celia Wade-Brown asked for the building to be lit in rainbow - the vivid ensign that symbolises lesbian, gay, bisexual, transgender, intersex (LGBTI) pride - on Monday morning.

UNANSWERED QUESTIONS

Condemnations of the carnage in downtown Orlando flooded the airwaves from officials and pundits across the political spectrum in the US.

REUTERS Some 50 people are dead, including the gunman, following a shooting at a gay nightclub in Orlando, Florida.

But many questions remained unanswered. It was unclear, for example, how a lone gunman managed to hold so many people inside the nightclub for so long, whether any of the clubgoers tried to stop him and why police waited three hours to intervene. A clear timeline of events, including when the victims were killed and injured and who shot them, remained elusive.

Authorities declined to offer details. But a senior US law enforcement official said officers delayed their assault on the gunman because the active-shooter scene turned into a hostage negotiation once the gunman called 911. For three hours, the gunman was on the phone with police and no shots were fired.

"That is when you do wait," said the official, who spoke on the condition of anonymity because he was not an authorised spokesman. "It was appropriate."

TWITTER Image showing police, emergency vehicles at scene of reported shooting at downtown Orlando nightclub.

Police ultimately chose to end the standoff because of concerns about the health and safety of dozens of people who were injured and trapped inside.

Officials at nearby Orlando Regional Medical Centre said at least nine people died at the hospital or were dead when they arrived. It was unclear whether anyone was injured during the gunman's final shootout with officers, although authorities said one Orlando police officer was shot but that his Kevlar helmet saved him.

ISIS CONNECTION?

NACHO DOCE A man places a candle as a sign of condolence for victims in Sao Paulo, Brazil.

The Islamic State has repeatedly executed gay people and released videos showing their gruesome executions. FBI Special Agent Ron Hopper said the bureau was still working to determine whether sexual orientation was a motive in the Orlando attack. He said investigators had found no indication that Mateen had outside help in planning the attack, nor any sign of other suspects or further threats to the public.

Much was also still to be learned about Mateen's background, although details about his previous contacts with law enforcement officials began to emerge.

Much like Tamerlan Tsarnaev, the older of the two brothers who carried out the Boston Marathon bombing, Mateen had been on the FBI's radar.

STEVE NESIUS/REUTERS Clubgoers initially thought the gunshots were part of the music.

Hopper, who runs the FBI's Orlando office, told reporters that Mateen had twice been investigated by the bureau and was cleared both times.

In 2013, Hopper said agents twice interviewed Mateen after he made "inflammatory comments to co-workers alleging possible ties to terrorists." The FBI closed the investigation after it was unable to verify the details of his comments, Hopper said.

The following year, FBI agents examined possible 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.

STEVE NESIUS/REUTERS Clubgoers, still with blood on their clothes, gave statements to police.

"We determined that contact was minimal and did not constitute a substantive relationship or a threat at that time," Hopper said.

Meanwhile, Mateen's ex-wife said in an interview Sunday that he beat her repeatedly during their brief marriage and that Mateen, who was Muslim, was not very religious and gave no indication that he was devoted to radical Islam.

"He was not a stable person," said the ex-wife, who spoke on the condition of anonymity because she feared for her safety. "He would just come home and start beating me up because the laundry wasn't finished or something like that."

STEVE NESIUS/REUTERS Friends and families wait for news from police.

GUNS BOUGHT IN LAST FEW DAYS

The gunman was armed with a handgun and an assault rifle and was carrying additional rounds.

"It appears he was organised and well-prepared," Orlando Police Chief John Mina said.

KEVIN KOLCZYNSKI/REUTERS Police lock down Orange Avenue around Pulse nightclub.

Mateen had legally purchased the two guns - which the Bureau of Alcohol, Tobacco, Firearms and Explosives said were a .223-caliber AR-15-type assault rifle and a 9mm semiautomatic pistol - within "the last few days," according to Trevor Velinor of the ATF.

The AR-15 is the civilian variant of the M16 military rifle and is one of the US's most popular weapons. A standard magazine carries about 30 bullets.

SURVIVORS TELL OF HORROR

REUTERS Florida Governor Rick Scott says the massacre at an Orlando nightclub was "clearly an act of terror", and becomes emotional as he empathises with the grieving families.

The violence in the crowded nightclub began as Saturday gave way to Sunday. About 2 am, Pulse Orlando posted an urgent message on Facebook: "Everyone get out of pulse and keep running."

Within minutes, police vehicles and a SWAT team descended on the club.

"I was there," Ricardo J. Negron posted on Pulse's Facebook page several hours later. "Shooter opened fire @ around 2:00am. People on the dance floor and bar got down on the floor and some of us who were near the bar and back exit managed to go out through the outdoor area and just ran. I am safely home and hoping everyone gets home safely as well."

KEVIN KOLCZYNSKI/REUTERS Orlando Police Chief John Mina and other city officials answer the media's questions about the Pulse nightclub shooting.

Many of the injured were taken to the regional medical centre, which was locked down until Sunday afternoon. The hospital permitted only two family members at a time to go inside, leaving 45 people waiting in the 84-degree heat.

Some people emerged from the hospital with tears streaming down their faces. One woman lay on the ground, moaning "no" over and over until her family led her away.

Joannette Martinez said her family became worried when they couldn't find her 24-year-old sister, Yilmary. It was Yilmary's first time at the club, Joanette said; she was celebrating a visit from her brother-in-law.

Fairfax Media In the wake of the deadliest shooting in US history, likely presidential candidates Donald Trump and Hillary Clinton react.

"No one's told us anything," Martinez said as she sat on the sidewalk, her back to the hospital, after waiting for several hours.

At the Hampton Inn & Suites, Jose Honorato waited with his seven siblings for word about his younger brother Miguel.

"He was at the club with three friends. They made it out safely when the shooting started, but they don't know if he made it out," Honorato said.

Honorato said he had called Miguel's phone, but it just kept ringing and went to voicemail.

Police described a hellish scene inside the nightclub, which was strewn with bodies. "It's absolutely terrible," Mina said. "Fifty victims in one location, one shooting."

POLITICAL RESPONSE

The massive law enforcement response included a number of federal agencies. Attorney General Loretta E. Lynch, who was scheduled to attend a meeting in Beijing on cybersecurity, said Sunday that she was returning to Washington so she could monitor the investigation.

At the White House, Obama met with FBI Director James B. Comey and then briefly addressed the nation, saying the entire country stands "with the people of Orlando, who have endured a terrible attack on their city."

The president said it was too early to know "the precise motivations of the killer," but that the FBI would investigate possible links between the gunman and terrorist groups.

Echoing comments he has made after other mass shootings, Obama said the bloodshed served to highlight how easily people can obtain guns in the United States. He also signed a proclamation honoring the victims and ordering that American flags be flown at half-staff until sunset on Thursday.

In Orlando, Joshua and Mary Zika, who live less than a block from the nightclub, said they were particularly appalled that the shooter had appeared to target a particular group.

"We're proud of our gay community in Orlando," Mary Zika said.

By early Sunday evening, a Florida LGBT advocacy group had raised nearly half a million dollars for the victims. More than 11,000 people had donated to Equality Florida's GoFundMe page in six hours, raising more than $480,000. The funds will go directly to victims and their families, according to the page.

Sunday's rampage followed another shooting in Orlando: The fatal slaying Friday night of a pop singer who was killed while signing autographs after a performance at an Orlando concert venue.

Christina Grimmie, a 22-year-old singer who was a finalist on NBC's "The Voice," died hours after she was shot by a gunman who then shot himself, police said.