The archaic law criminalises same-sex intercourse and LGBTQ rights groups have petitioned the court to review the law.

India’s Supreme Court is expected to rule on an archaic law that criminalises gay sex.

The country’s LGBTQ community is hopeful that the controversial ban, which India’s top court reinstated in 2013 after four years of decriminalisation, will be struck down on Thursday.

In July this year, the court heard a series of petitions asking it to review a previous ruling that upheld the 1861 British colonial-era law, under which “unnatural sex” is a criminal act punishable by a 10-year prison term and a fine.

A five-judge bench, headed by Chief Justice Dipak Misra, will deliver the ruling, according to the cause-list on the court website.

“The mood is extremely optimistic. The judges have been extremely empathetic,” Akhilesh Godi, one of the petitioners in the case, told Reuters news agency. “It is not only about decriminalising but recognising our fundamental rights.”

In 2009, the Delhi High Court declared Section 377 of the Indian Penal Code unconstitutional. But, four years later, the Supreme Court overturned the verdict, saying any amendment must be made by parliament and not the judiciary.

Several individuals and LGBTQ rights groups then petitioned the Supreme Court to review that decision, saying members of the community lived in fear of being prosecuted.

The ruling is expected to decriminalise gay sex and lead to a change in the government’s stance on homosexuality.

In its hearings, the court said “no one should have to live in fear because of their sexuality”, according to broadcaster NDTV.

The government, which had earlier supported the anti-gay sex law, said it left it to the judges to decide whether the law was constitutional.