Hong Kong must provide an alternative to marriage in order to legally recognise the rights of same-sex couples, the city’s highest court has declared, opening the way for civil unions.

However, it rejected appeals against current laws which restrict marriage to heterosexual couples and refuse to recognise overseas same-sex marriages, despite majority support among the population.

The ruling said Hong Kong’s government was “in violation of its positive obligations” under the bill of rights to provide a legal framework to recognise same-sex couples outside the institution of marriage, and gave it two years to establish a system.