SINGAPORE — Singapore’s high court upheld on Monday a rarely-used law that criminalizes sex between men, dismissing three appeals that argued it was unconstitutional.

The ruling follows challenges to the colonial-era law by activists emboldened after India’s decision to scrap similar legislation in 2018. Previous repeal efforts in the socially conservative city-state in 2014 also failed.

“The High Court dismisses all three applications,” Judge See Kee Oon said in a summary of the case published by the court.

“Legislation remains important in reflecting public sentiment and beliefs,” it said, adding that non-enforcement of the law against consensual male homosexual activity in private did not make it redundant.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Bryan Choong, one of the three men who challenged the law, said he was disappointed by the ruling. “But my eyes are firmly on the road ahead,” he said.

The Attorney-General’s Chambers did not immediately comment. Previously, it has said prosecution under the law would not be in the public interest.

Prime Minister Lee Hsien Loong has previously said that society in Singapore “is not that liberal on these matters”.

However, after the Indian decision, a prominent Singapore diplomat urged challenges to the city-state’s law, while Law Minister K. Shanmugam said a “growing minority” wanted it repealed and that laws should keep pace with societal change.

Polls have also suggested changing attitudes toward gays, and a perceived softening in tone from some establishment figures.

The applicants in Monday’s cases had argued that Section 377A, which provides for jail terms of up to two years for a man found to have committed an act of “gross indecency” with another man, was unconstitutional. The law does not apply to lesbians.

Rights groups had said Singapore’s decision had wider implications for Asia, where social attitudes are conservative.

“In declining to strike out this archaic and discriminatory law, the court has reaffirmed that all gay men in Singapore are effectively unapprehended criminals,” Téa Braun, director of the London-based rights group, Human Dignity Trust, said in a statement.

There have been concerns around growing intolerance toward the lesbian, gay, bisexual and transgender community in Muslim-majority neighbors like Malaysia and Indonesia.

Follow NBC Out on Twitter, Facebook & Instagram