Lawmakers in Hong Kong have rejected a controversial bill that would have granted limited rights to same-sex couples, in a blow to the city's gay rights movement.

The law, which would have recognised some rights for couples who were married overseas, was opposed by 71 of the city's 89-member Legislative Council (LegCo).

It was proposed by the government to comply with a 2023 court ruling, following the rejection of an attempt to legalise same-sex marriage.

While the city has in recent years been perceived as becoming gay-friendly, it has limited rights for the estimated 6% of the adult population who identify as LGBTQ. Recent polls suggest there is rising support towards the community.

Human rights group Amnesty International criticised the rejection of the bill, saying that it showed an alarming disdain for LGBTQ rights, and urged Hong Kong authorities to introduce a new and revised bill.

Hong Kong LGBTQ rights activist Jimmy Sham said it was deeply regrettable that the bill did not pass and that the government's inability to protect same-sex couples rights would remain an open wound.

The bill stemmed from a long-running legal challenge to legalise same-sex marriage initiated by Sham, who had wanted official recognition of his marriage to his husband. The pair were married in New York in 2013.

The Hong Kong's top court shot this down in 2023, but in a partial victory for activists, the Court of Final Appeal said at the time that the Hong Kong government had to formulate an alternative framework within two years to recognise unions between members of the same sex.

This year's bill was an attempt by the Hong Kong government to fulfil this legal obligation.

The proposed bill included a registration system for same-sex couples married or in civil unions overseas, granting rights like hospital visitation and making medical decisions for a spouse.

Despite the bill's backing from the city's chief executive John Lee, it was ultimately rejected, marking a rare split between the legislature and the Hong Kong government.

Polls suggest that there is rising support for same-sex marriages among the Hong Kong public, with a survey in 2023 indicating 60% in favour, compared to 38% a decade ago.

Many in the LegCo are known to be pro-Beijing since China passed a law requiring only patriots to be part of the legislature, complicating the political landscape for LGBTQ rights in the city.