NEW DELHI, India (CNN) -- Sex between consenting homosexual partners is once again illegal in India after the country's Supreme Court overturned a lower court ruling Wednesday.
Four years ago, India's High Court decriminalized such a relationship, in what was then hailed by gay rights groups as a landmark ruling.
The Supreme Court overturned that ruling.
The law has been in the books since India's Colonial-era days. It bans people from engaging in "carnal acts against the order of nature."
On Wednesday, the Supreme Court ruled that the penal code was constitutionally valid.
It was up to parliament, the court said, to decide whether or not to keep the law in the statute books.
Seven year fight
In 2009, the non-profit Naz Foundation won a verdict from New Delhi's high court after a seven-year legal fight to decriminalize homosexuality.
It argued that the law infringed on the right to equality, privacy and dignity as set out in India's Constitution.
The High court ruled in Naz's favor. But the decision came under fire from Christian, Hindu and Muslim groups, who filed an appeal to the Supreme Court.
India's central government did not appeal, saying it didn't disagree with the High Court's ruling.
Amnesty International India called Wednesday's Supreme Court ruling "a black day of freedom in India."
"It is hard not to feel let down by this judgment, which has taken India back several years in its commitment to protect basic rights," the group said.
From our media partner CNNHarmeet Shah Singh