India’s top court has decided to review a 2013 judgment that reinstated a colonial era law criminalizing gay sex. The review is raising hopes among gay rights activists who have been fighting to overturn the law.

Tuesday’s decision came in response to a petition asking the Supreme Court to re-examine whether a 165-year-old law that penalizes same sex relationships as an “unnatural offense” is constitutional.

The battle for gay rights has taken a tortuous route in India. In 2009, the country took a huge step forward when, in a landmark verdict, the Delhi High Court scrapped the controversial law. But in a surprise decision two years ago, the Supreme Court reversed that ruling, which had been challenged by mostly religious groups. The judges said it was up to parliament to legislate on the section.

Fighting for rights

It was a major setback for the LGBT (lesbian, gay, bisexual, transgender) community, which has been fighting to win acceptance in a country where large sections are still conservative and frown upon homosexuality.

A group of Indian activists hold a banner against section 377 of the Indian Penal Code that criminalizes homosexuality during a protest in Mumbai, India, Dec. 11, 2013.

As the Supreme Court reopened the doors for legal redress, a wave of optimism swept through gay activists.

Anjali Gopalan, executive director of the Naz Foundation, which has spearheaded the legal battle on behalf of the gay community, expressed great relief. Pointing out that it would have been the end of the legal road for homosexuals if the Supreme Court had dismissed their “curative” petition, she said, “It shows there has been some shift in the way this issue is being viewed, publicly as well as in the mind of the state. So hopefully, we look forward to better times.”

Last resort procedure

A curative petition to the five-judge bench is the last resort for legal remedy and is admitted only in extremely rare cases.

Until today’s ruling, the gay community’s only hope in overturning the law lay in persuading lawmakers to change it. But those hopes had faded after the right wing, Hindu Bharatiya Janata Party came to power in 2014. In December, efforts to move a private members bill to scrap the law were stonewalled by the BJP.

FILE - Participants holding a rainbow flag pass through a junction during a gay pride parade, which is promoting gay, lesbian, bisexual and transgender rights, in Mumbai, Jan. 31, 2015.

A gay rights activist and fashion designer in the southern city of Chennai, Sunil Menon, says the world is watching what India will do on the issue.

“We are under the global spotlight right now because this is a very regressive stance that the country has taken over the years, nobody has even tried to make an effort to change it,” says Menon.

India is one of about 75 countries that outlaws homosexuality. Section 377 imposes a 10-year sentence for gay sex. Although that is seldom enforced, the homosexual community has long complained of harassment by law enforcement authorities.

While the law may be archaic, in recent years the gay community has fought more openly and vocally for their rights, organizing gay pride marches in big cities such as Delhi and Bangalore. On Tuesday, many said that irrespective of the final outcome in the Supreme Court, they are determined to “live with pride and not go back into the closet.”