Media playback is unsupported on your device Media caption Mayor Buddy Dyer: "Yesterday was the most horrific day in history of the city of Orlando"

The authorities in Orlando, Florida, have been giving more details of the gun attack on a gay club early on Sunday, when 49 people were killed.

The deadliest mass shooting in recent US history ended with gunman Omar Mateen being killed himself. The attack also left 53 people injured.

After Mateen holed up in a toilet with hostages at the Pulse club, police tried to blow a hole in a wall.

When that failed, they used a Bearcat armoured vehicle to break through.

Live updates

How attacks unfolded

Who was Omar Mateen?

Orlando shooting: Special report

Image copyright Getty Images Image caption Authorities are releasing the names of the victims once their next of kin have been informed

Image copyright Getty Images Image caption The last of the bodies were removed from the Pulse nightclub overnight on Sunday into Monday, officials said

Orlando Mayor Buddy Dyer praised the "heroic acts" of the city's police department, law enforcement agencies and citizens.

The authorities made clear that the death toll from the shooting was 49; an earlier figure of 50 included the gunman, who was shot dead by police.

An off-duty officer working at the club had initially fought Mateen in a gun battle. Shortly after, more police officers arrived.

They engaged Mateen, forcing him to retreat to the toilet, where he was holding hostages, Orlando police chief John Mina said.

Mateen phoned the police from the toilet, Mr Mina said, and made a pledge of allegiance to the so-called Islamic State group (IS) while speaking to them.

Chief Mina said that statements made by the suspect while he was holed up in the toilet, and information from people trapped inside, had convinced police that further loss of life was imminent.

After officers broke through the wall, "dozens and dozens" of people emerged from the hole, the police chief said.

Mateen himself came out shooting and was killed, he added.

Who were the victims?

Image copyright Reuters Image caption Clockwise from top left: Orlando shooting victims Edward Sotomayor, Stanley Almodovar, Luis Omar Ocasio-Ocampo, Juan Ramon Guerrero, Luis Vielma and Eric Ivan Ortiz-Rivera

So far, 33 victims have been named: 29 men and four women. They include:

Edward Sotomayor , 34, who worked for a company that organised gay cruises

, 34, who worked for a company that organised gay cruises Stanley Almodovar , 23, a pharmacy technician who was remembered as "kind and sassy"

, 23, a pharmacy technician who was remembered as "kind and sassy" Kimberly Morris , 37, who had only recently moved to Orlando and worked at Pulse as a bouncer

, 37, who had only recently moved to Orlando and worked at Pulse as a bouncer Luis Vielma , 22, who worked at the Harry Potter section at Universal Studios - author J K Rowling paid tribute to him online

, 22, who worked at the Harry Potter section at Universal Studios - author J K Rowling paid tribute to him online Eddie Justice, 30, who sent his mother a series of text messages while inside the club - read more on him here

Read more on the victims here

LGBT community under siege

Who was the killer?

Image copyright CBS News Image caption US media have published pictures of the suspect, Omar Mateen

Mateen, a US citizen of Afghan descent who was born in New York and lived in Florida, was not on a terrorism watch list.

However, the FBI interviewed him twice in 2013-14 after he made "inflammatory remarks" to a colleague, before closing its investigation.

Mateen had legally purchased several guns in the days before the attack.

Seddique Mateen, the father of the gunman, said he did not know that his son had a "grudge in his heart" and did not understand why his son had carried out the shooting.

Media playback is unsupported on your device Media caption Seddique Mateen said he did not understand why his son had carried out the shooting

A statement on the IS-affiliated Amaq news agency said an IS "fighter" was responsible and on Monday, the group's al-Bayan radio called Mateen "one of the Caliphate's soldiers in the US".

Image copyright Omar Mateen Image caption Mateen's father said his motives had nothing to do with religion

A security company that Mateen used to work for said he had been vetted twice.

The checks in 2007 and 2013 did not reveal anything of concern, G4S said, and Mateen had carried a gun as part of his job.

G4S shares slide on Florida gunman link

Analysis: Gordon Corera, BBC Security Correspondent

The FBI's admission that it investigated Mateen on a number of occasions will raise questions not just for law enforcement but for the wider US security community.

It has frequently been the case in a number of countries that individuals are assessed as not dangerous at one point and then turn out to be a threat later. In the UK, this led the Security Service to place more emphasis on going back and checking up on previous cases to ensure that the threat assessment made in the past had not changed.

Keeping detailed files and watch on people can be resource-intensive, however, and has raised concerns over civil liberties in the past.

As the concern over home-grown terrorism in the US grows, there may be pressure to do more and there may also be further questions as to whether a previous investigation for possible terrorism should place people not just on No-Fly lists, but also restrict their ability to purchase weapons.

Ex-wife: Mateen was 'disturbed'

Media playback is unsupported on your device Media caption Sitora Yusufiy, supported by her fiance, talks about her ex-husband, Omar Mateen

Sitora Yusufiy lived with Mateen for four months in 2009. She said her family had "rescued" her from the relationship when they became aware he was being physically abusive.

He beat her up regularly during their short-lived marriage for trivial things like not doing laundry, she said.

"When he would get in his tempers, he would express hate toward everything. He was mentally unstable and mentally ill: that's the only explanation that I could give."

Image copyright AP Image caption Vigils were held in US cities, including here in Atlanta, to mourn the victims of the Orlando shooting

Image copyright Getty Images Image caption A vigil was held in Seoul on Monday to honour the victims

Image copyright AFP Image caption Sydney residents gathered to place candles and flags in memory of the victims on Monday

The reaction

President Barack Obama called the attack an "act of terror" and an "act of hate".

The presumptive Republican presidential nominee Donald Trump said on Monday that the US needed to stop the flow of Syrian refugees to prevent such attacks.

He also blamed the Muslim community for not reporting Mateen to the authorities, despite suspicions that he was a "whack job".

People knew it was going to happen but they did not report him, he said.

The AR-15 semi-automatic rifle One of the two guns used by Omar Mateen 3.3 million AR-15s in the US in 2012 (estimated) 45 rounds per minute

26 people killed by AR-15 in Sandy Hook in 2012

0 days' wait needed to obtain one in Florida Getty Images

Image copyright Getty Images Image caption President Obama ordered flags at federal buildings to be flown at half-mast

The death toll means that the Orlando attack surpasses the 2007 massacre at Virginia Tech, which left 32 people dead.

According to the crowd-sourced Mass Shooting Tracker, the US suffered 372 mass shootings last year, defined as a single incident that kills or injures four or more people. Some 475 people were killed and 1,870 wounded.

Cities around the world have been flying rainbow gay pride flags and illuminating buildings in solidarity with the victims of the shooting in Florida.

A London vigil is planned for 19:00 BST on Monday in Old Compton Street in the heart of Soho.