Gay sex is considered taboo by many in socially conservative India, and was reinstated as a criminal offense in 2013 after four years of decriminalization.
A five-judge bench in India’s Supreme Court was unanimous in overturning the ban
“Any consensual sexual relationship between two consenting adults - homosexuals, heterosexuals or lesbians - cannot be said to be unconstitutional,” said the Chief Justice of India, Dipak Misra, as he read out the judgment.
Gay sex had been punishable by up to 10 years in jail.
Activists welcomed the ruling.
“Thanks to all that fought for this, braving the worst sort of prejudice. This is a good day for human rights,” Meenakshi Ganguly, South Asia director for Human Rights Watch said on Twitter.
“It is not only about decriminalizing but recognizing our fundamental rights,” Akhilesh Godi, one of the petitioners in the case, told Reuters shortly before the judgment was announced.
The judges in the case had previously said that gay people in India faced deep-rooted trauma and live in fear.
A law known as “Section 377” had prohibited “carnal intercourse against the order of nature with any man, woman or animal” - which was widely interpreted to refer to homosexual sex.