In response, Law Minister Kapil Sibal said the Supreme Court is the final arbiter. “Parliament will take it up in due course,” he said, not spelling out a time-frame.

The court’s order means gay sex between consenting adults stays a criminal offence under Section 377, a British colonial era law banning “carnal intercourse against the order of nature”, which had been struck down by the high court. The Supreme Court said there is “no constitutional infirmity” in that law.

“It is surprising that the court which does judicial review on many issues has put the ball in the court of Parliament to decide on homosexuality,” said additional Solicitor General Indira Jaising. “People expect the highest court of the land to protect their rights.”

The order is “a step backwards towards barbarism and medievalism,” tweeted noted historian Ramachandra Guha.

Gay rights NGO Naz foundation has said it will seek a review of the verdict.

[The first-ever gay-pride parade in the western Indian state of Gujarat took place in October 2013]

Conviction under the existing 1890 law carries a fine and up to 10 years in jail. Gay activists allege that the police used the law to harass members of their community.

Though the court leaves it to the government to act next, the numerous flip-flops by the Centre has not encouraged activists.

The high court ruling was challenged in the Supreme Court by religious groups who argued that all homosexual acts were “unnatural”.

In recent years, the country’s gay community has raised its profile, organising gay pride parades in major cities, which activists say have helped create awareness and encouraged many to come out of the closet.

The UN had said in 2008 that decriminalising homosexuality would help India to combat the spread of HIV/AIDS.