NEW DELHI  - India’s Supreme Court Wednesday reinstated a colonial-era ban on gay marriage that enables the jailing of homosexuals in a major setback for rights campaigners in the world’s biggest democracy.

A two-judge bench struck down a landmark Delhi High Court ruling in 2009. The decision four years ago to decriminalise gay sex emboldened the still largely closeted homosexual community which has since campaigned publicly against widespread discrimination and ignorance.

But the Supreme Court bench, headed by GS Singhvi on his last day before retirement, found the High Court had overstepped its authority and that a law passed by the British in 1860 was still constitutionally valid.

“It is up to parliament to legislate on this issue,” Singhvi said in the judgement which crushed the hopes of activists who had fought the case and led to tears outside the court in central New Delhi.

The 2009 ruling was strongly opposed by religious groups, particularly leaders of India’s Muslim and Christian communities, who appealed to the Supreme Court and were delighted with Wednesday’s outcome.

“Such a decision was totally unexpected from the top court. It is a black day for the community,” Arvind Narayan, a lawyer of the Alternative Law Forum gay rights group, told reporters outside court.

India’s law minister promised to review the ruling, but a new gay rights law that would have limited public support is unlikely to pass the dysfunctional national parliament before general elections next year. “We have the right to make laws and we will exercise that. If the parliament runs we shall take up this issue,” Law Minister Kapil Sibal told reporters.

Amnesty International called the decision a “body blow to people’s rights to equality, privacy and dignity”, while a legal challenge from gay rights groups is also possible. “We will explore all options, probably look into the option of a review petition,” T. Tandon, a lawyer appearing for Naz Foundation, a non-profit group that has spearheaded legal activism against the law.

“The movement of gay rights is so much stronger now. It is not 2001, it is 2013. You can’t have a decision like this.”

Religious groups who opposed the 2009 repeal hailed the reinstatement of the law, which is rarely invoked in practice.