India's Supreme Court is currently hearing a challenge to Section 377 of the Indian Penal Code that criminalizes homosexuality. Under the colonial-era law, passed by the British in the 1860s, homosexual acts are punishable by a 10-year prison term.
After two days of arguments, the Chief Justice of India, Dipak Misra, appeared to indicate that the 157-year-old ban may soon be gone.
"We intend to rule, subject to arguments, that two consenting adults ,even if engaged in 'unnatural sex,' will not be liable for prosecution for any offence," Misra said Wednesday.
Justice J Chandrachud, who is part of the five-judge constitutional bench examining the case, said, "We don't want a situation where two homosexuals enjoying a walk on Marine Drive [a Mumbai boulevard] should be disturbed by the police and charged under Section 377."
Read more:Renewed hope for gay rights in India
The court's observation came after a lawyer for the government said that it should be left to "the wisdom" of the court to decide the constitutional validity of Section 377, marking a significant shift from the government's earlier position.
The lawyer, however, urged the court to confine itself to the question of sexual rights in the cases relating to decriminalization of Section 377, and not to touch issues like gay marriage, adoption and ancillary civil rights of the lesbian, gay, bisexual and transgender (LGBT) community.
Hopes ride high for LGBTs
"The court's observations over the last two days and their decision to take up the case immediately give us hope. Moreover the government's position of leaving the court to decide on the issue is significant," Anjali Gopalan, executive director of Naz Foundation, an NGO working to prevent HIV/AIDS, told DW.
"We were surprised when we had learned that the chief justice advanced the hearing of our petition and even reshuffled judges for the hearing. We hope to get a positive outcome this time around," petitioner Balachandran Ramiah, told DW.
The approximately 33-million-strong Indian LGBT community faces deep-seated discrimination in the socially conservative country. As the law prohibits "carnal intercourse against the order of nature with any man, woman or animal," they are often in the crosshairs of authorities, who are accused of intimidating, harassing and blackmailing LGBT people.
Read more: Gay rights activists march in New Delhi amid continuing LGBT discrimination
Over the past decade, however, homosexuals have gained a degree of acceptance in India, especially in big cities. Many bars have gay nights, and some high-profile Bollywood films have dealt with gay issues.
Still, being gay is largely seen as shameful in most of the country, and many homosexuals remain closeted.
The legal battle against Section 377 is nearly two-decades old. A petition was first filed in the Delhi High Court in 2001 by the Naz Foundation.
In 2009, the Delhi court declared the law unconstitutional, drawing cheers from the LGBT community and activists. But the judgment was overturned in 2013 when the Supreme Court decided that repealing the law should be left to Parliament, not the judiciary. However, the political class lobbed it back to the courts.
A long, arduous battle
"We want to come out and claim our sexual orientation and gender identity. It is not for political parties to decide our sexuality," gay rights activist Harish Iyer, told DW.
"Foremost is that the court decides that no one is criminalized because of whom they want to love and live with. We too want to have a meaningful relationship the way heterosexuals can," Udai Bhardwaj, an engineering student, told DW.
At a time when many countries across the world are passing progressive laws that uphold the dignity and fundamental human rights of the LGBT community, observers say the Indian government did not want to be left out and was keen to present an image of India as a modern liberal democracy.
Read more: Release of LGBT+ film Love, Simon delayed in India
"Successive Indian governments have so far ducked the sensitive question of allowing homosexuality. But for how long can we afford to do this? That is why we have left it to the court and we are okay with giving equal rights to the LGBT community," a senior official in the home ministry told DW on condition of anonymity.
In August last year, the Supreme Court in its right to privacy judgment said that sexual orientation was an essential attribute of privacy. In this seminal judgment, the court ruled that discrimination against an individual on the basis of sexual orientation was deeply offensive to the dignity and self-worth of an individual.
"Sexuality lies at the core of a human being's persona. Sexual expression, in whatever form, between consenting adults in the privacy of a home ought to receive the protection of fundamental rights," says their petition.
For India's LGBT community, the struggle has been long, and the petitioners hope that the label of being a criminal will soon be removed. Apart from India, a host of countries, including Afghanistan, Iran, Ghana, Mauritania, Pakistan, Nigeria, Qatar and Saudi Arabia, currently criminalize homosexuality.