Under Singapore's Section 377A, men who have sex with men could be jailed for up to two years, although a 2007 debate concluded that the law would not be strongly enforced.
Today, the law — introduced in the 1930s by the British colonial government — has been repealed.
LGBT activists in Singapore have hailed the move as "a win for humanity."
"This will bring the law in line with current social more, and I hope will bring some relief to gay Singaporeans," Prime Minister Lee Hsien Loong said in his televised announcement, saying, "Private sexual behavior between consenting adults does not raise any law and order issue."
He added that "While we remain a broadly conservative society, gay people are now better accepted in Singapore, especially among younger Singaporeans."
A coalition of LGBT rights groups told the BBC it was a "hard-won victory and a triumph of love over fear," with LGBT activist Johnson Ong saying, "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. Today we are very, very happy."
However, Prime Minister Loong said that there is no plan to legalize gay marriage in the country.
Singapore will "protect the definition of marriage from being challenged constitutionally in the courts. This will help us repeal Section 377A in a controlled and carefully considered way," he said.