NEW DELHI – The Indian Supreme Court reinstated on Wednesday a colonial-era law banning gay sex, ruling that it had been struck down improperly by a lower court.

The 1861 law, which imposes a 10-year sentence for "carnal intercourse against the order of nature," was ruled unconstitutional in a 2009 decision. But the Supreme Court held that only Parliament had the power to change that law.

There is almost no chance that Parliament will act where the court did not, advocates and opponents of the law agreed.

Anjali Gopalan, founder of a charity that sued to overturn the 1861 law, said she was shocked by the ruling.

India has a rich history of eunuchs and transgender people who serve critical roles in important social functions and whose blessings are eagerly sought. Transgender people often approach cars sitting at traffic lights here and ask for money, and many Indians — fearing a powerful curse if they refuse — hand over small bills.

NEW YORK TIMES