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 who were emboldened after India’s Supreme Court struck down a similar law in 2018. Previous repeal efforts in 2014 in socially conservative Singapore 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,” the summary said, adding that non-enforcement of the law against consensual male homosexual activity in private did not make it redundant.