Inherited from the British colonial era, section 377A of Singapore's penal code penalises sex between men with up to two years in jail.
Singapore's Prime Minister Lee Hsien Loong announced Sunday the country will repeal a colonial-era law criminalising gay sex, though he maintained that the government will continue to "uphold" marriage as between a man and a woman.
Inherited from the British colonial era, section 377A of Singapore's penal code penalises sex between men with up to two years in jail.
Gay rights campaigners have long said the law runs afoul of the affluent city-state's increasingly modern and vibrant culture, and had mounted two unsuccessful legal challenges.
During a major policy speech Sunday, Lee said attitudes have shifted since 15 years ago when the government decided the law should remain, although it has not been actively enforced.
Gay people "are now better accepted" locally, especially among younger Singaporeans, he said.
"It is timely to ask ourselves again the fundamental question: Should sex between men in private be a criminal offence?" Lee said.
"The government will repeal section 377A and decriminalise sex between men. I believe this is the right thing to do, and something that most Singaporeans will now accept."
He added: "This will bring the law into line with current social mores, and I hope, provide some relief to gay Singaporeans".
However, the repeal of section 377A stops short of full marriage equality.
Lee said the government recognises that "most Singaporeans do not want the repeal to trigger a drastic shift in our societal norms across the board", including how marriage is defined and how it is taught in schools.
"Hence, even as we repeal section 377A, we will uphold and safeguard the institution of marriage," he said.
He stressed that under the law, "only marriages between one man and one woman are recognised in Singapore".
The government will amend the constitution to protect the existing definition of marriage from being challenged constitutionally in the courts, Lee added.
'Long road to equality'
The first attempt to overturn the law was rejected in 2014. The Court of Appeals dismissed the second challenge last February.
Gay rights campaigners on Sunday expressed "relief" over the government's decision.
"The repeal of Section 377A is the first step on a long road towards full equality for LGBTQ+ people in Singapore," they said in joint statement signed by more than 20 groups.
But "the true impact of repeal will be determined by how the people of Singapore respond to it, and treat each other, in the days and months to come".
Ahead of Lee's speech, an alliance of Protestant churches in Singapore had warned Friday against removing the law, which it described as a "marker for many social and moral considerations".
In 2018, India's Supreme Court decriminalised gay sex by overturning legislation from its own period under British rule -- a decision that spurred campaigners in Singapore to renew their efforts to challenge the law.
The following year, Taiwan took the unprecedented decision in May to legalise same-sex marriage, becoming the first place in Asia to do so.