Image copyright AP Image caption The city's mayor said the building would stay as it was for at least a year

The city of Orlando in Florida has announced plans to buy the Pulse gay nightclub and convert it into a memorial to the 49 people shot dead by a gunman there in June.

Mayor Buddy Dyer said the building was of "great significance" as it was the site of "the most tragic event that has ever occurred" in Orlando's history.

Local media reported that the site would cost the city $2.25m (£1.8m).

The attack was the worst mass shooting in recent US history.

Omar Mateen took hostages inside the club on a Saturday night when 300 people were there.

People hid in toilets and dressing rooms to try to escape the gunman. He shot his victims with an automatic weapon and a handgun and was later killed by police.

The co-called Islamic State group (IS) claimed him as one its fighters.

But his father said the attack had nothing to do with religion, but that his son had harboured anti-gay views. And it emerged that Mateen had visited the club and was known there as a gay man.

What is internalised homophobia?

Image copyright AP Image caption Visitors to the Pulse nightclub have signed the wall in memory of those who died

Since the attack, many people from across the US have visited the Pulse building to pay their respects.

Mayor Dyer said in a video posted to Twitter that the club had "great significance not just for the LGBT community and the Hispanic community but for all of us who live in and love Orlando".

He said consultations would be held with community groups to determine the form the memorial would take.

The city will maintain it for 12 to 18 months "so that people from around the country and world who want to visit the site can do so", he added.