Singapore will repeal a law that bans gay sex, effectively making it legal to be homosexual in the city-state.
The decision, announced by Prime Minister Lee Hsien Loong on national TV, comes after years of fierce debate.
LGBT activists in Singapore have hailed the move as "a win for humanity".
The city-state is known for its conservative values, but in recent years an increasing number of people have called for the colonial-era 377A law to be abolished.
Singapore is the latest place in Asia to move on LGBT rights, after India, Taiwan and Thailand.
The government's previous stance was to keep 377A - which bans sex between men - but it also promised not to enforce the law in an effort to appease both sides.
But on Sunday night, Mr Lee said they would abolish the law as he believed "this is the right thing to do, and something that most Singaporeans will accept".
He noted that "gay people are now better accepted" and scrapping 377A would bring the country's laws in line with "current social mores, and I hope, provide some relief to gay Singaporeans".
"We finally did it, and we're ecstatic that this discriminatory, antiquated law is finally going to be off the books. There's a sense that maybe it took a little too long, but it had to happen, you know. Today we are very, very happy," gay activist Johnson Ong told the BBC.
A coalition of LGBT rights groups called it a "hard-won victory and a triumph of love over fear", adding it was the first step towards full equality.
But they also expressed concern over another announcement Mr Lee made in the same speech.
He had said the government would ensure better legal protection for the definition of marriage as one between a man and a woman. This would effectively make it harder for gay marriage to be legalised.
He said Singapore remains a traditional society with many keen on maintaining family and social norms.
LGBT activists called this "disappointing" and warned that it would only further entrench discrimination in society.
Singapore inherited 377A from the British and chose to retain it after independence in 1965.
Though the law technically criminalises sex between men, it is effectively seen as a ban on homosexuality.
As it has not been actively enforced in recent years, a thriving and increasingly visible LGBT scene has developed in Singapore, including gay nightclubs.
But LGBT activists have long called for 377A to be scrapped, saying the law perpetuates social stigma against gay people, goes against Singapore's constitution which forbids discrimination, and has trickled down to influence other aspects of life.
For instance, any content deemed as "promoting homosexuality" can be banned from broadcast in Singapore, and TV shows and movies have in the past been censored.
The law is also at odds with Singapore's image as an open, diverse global financial hub and multinational companies based in the state have said it would hinder their efforts to attract talent.
While many in Singapore still support retaining 377A, in recent years the call for its abolition has grown stronger, with surveys showing growing support for LGBT rights.
At the same time both LGBT activists and conservatives - many of whom come from religious groups - have mobilised on both sides of the issue.
Protests and political gatherings are strictly regulated in Singapore, but every year LGBT activists hold the island's biggest civil society rally - known as Pink Dot - which draws tens of thousands of participants.
Meanwhile, conservatives have organised social media campaigns and events calling for the preservation of traditional values, and some churches have promoted controversial gay conversion programmes.
On Sunday, Mr Lee appealed to both camps for understanding.
In his National Day Rally speech - Singapore's equivalent of a State of the Union address - he said: "All groups should exercise restraint, because that is the only way we can move forward as a nation together."
Legacy of the British
Singapore is not the only former colony with a version of 377 - the law continues to exist in many parts of Asia, Africa and Oceania.
It was introduced by the colonial British government in India in the 19th Century, and forbade "carnal intercourse against the order of nature with any man, woman or animal".
It soon spread outside of India as the British used the Indian Penal Code as the basis for criminal law codes in other territories they controlled. Several former British colonies such as Kenya, Malaysia and Myanmar still have some version of 377.
In 2018, India's Supreme Court abolished 377 in a historic verdict, prompting hopes among activists that other former colonies would eventually follow suit.
In recent years, other parts of Asia have also moved to legalise gay marriage.
Taiwan became the first place to do so in 2019, and in June Thailand approved draft legislation allowing same-sex unions.
- BBC