Singapore's highest court on Monday dismissed three cases challenging the city-state's law criminalizing consensual sex between people of the same gender.

Although rarely enforced, the law calls for up to a two-year prison sentence for violators.

The law, introduced in 1938, is a holdover from when Singapore was a British colony.

OutRight Action International said that it was “incredibly disappointed” by the decision because such laws legitimize discrimination against the LGBT community.

“It is incredibly disappointing to see the High Court of Singapore uphold this colonial-era law,” OutRight Action International Executive Director Jessica Stern said in a statement. “Even while lying dormant, such laws send a strong message – that gay and bisexual men are not only second-class citizens, but also criminals, purely for who they love. Today that message was amplified, legitimizing societal hate, discrimination, and exclusion of LGBTIQ people in Singapore.”

The three cases involved gay men who argued that the colonial-era law was unconstitutional. But the high court disagreed, saying that the law did not violate articles related to equality and freedom of speech.

Singapore is among the 70 nations where gay sex is criminalized.