(PHILIPPE LOPEZ/AFP/Getty)

The High Court in Hong Kong has abolished four offences and changed the definition of three more that criminalise sex between men.

The court ruled today (May 30) that the four offences were unconstitutional and repealed them immediately, according to the South China Morning Post.

The decision came about following a case taken by LGBT+ activist Yeung Chu-wing challenging the laws.

The anti-gay laws have been repealed with immediate effect

Under the laws, gay men could be prosecuted for engaging in sexual acts that are legal for heterosexual people and for some same-sex female couples.

The crimes that have been overturned are: procuring others to commit homosexual buggery; gross indecency with or by a man under 16; gross indecency by a man with a man otherwise than in private; and procuring gross indecency by a man with a man.

Mr Justice Thomas Au Hing-cheung also ruled that three other offences will now apply to both men and women in order to meet constitutional obligations.

“This judicial review should not have happened in the first place… But every time we fought for [changes to these law], the government either refused or delayed.” – Tommy Noel Chen of Rainbow Action

The offences that will apply to both men and women under the law are: homosexual buggery with or by a man under 16; gross indecency by a man with a male mentally incapacitated person; and permitting a young person to resort to or be on a premises or vessel for intercourse, prostitution, buggery or homosexual acts.

Activists had been working for 20 years to have the laws changed

Tommy Noel Chen of Rainbow Action, a Hong Kong based LGBT+ rights group, said they had been working to have the laws changed for 20 years.

Michael Vidler, Yeung’s lawyer, said Hong Kong’s failure to repeal or amend the laws up until now is “all the more reprehensible” because it has “led to the prosecution, conviction and sentencing of gay men under these discriminatory laws.”

The decision comes just a day after Hong Kong’s government defended its refusal to introduce same-sex marriage or civil partnerships in court.

A Hong Kong woman known as MK is suing the government for denying her right to have a civil partnership and has argued that the ban is unconstitutional.

Defending the ban, lawyer Stewart Wong said that marriage would be “diluted and diminished” and “no longer special” if same-sex couples were allowed access to it.

“Not all differences in treatment are unlawful. You are not supposed to treat unequal cases alike,” Wong said.