India is contemplating the prospect of a major social revolution as a five-judge Constitution Bench of the Supreme Court this week hears a raft of petitions challenging Section 377 of the Indian Penal Code, which outlaws homosexuality.

The law, a legacy of the British colonial era, criminalises “unnatural acts against the order of nature”, and has long been used to harass gay Indians. Since it makes non penile-vaginal intercourse illegal, even between consenting adults, the lesbian, gay, bisexual and transgender (LGBT) community are particularly affected.

India: no country for transgender women

There was a brief respite when, in 2009, the Delhi High Court held section 377 to be unconstitutional and – “in so far as it criminalises consensual sexual acts of adults in private” – violative of Articles 14, 15 and 21 of the Constitution of India, which guarantee equality and dignity to all citizens, freedom of expression and personal liberty.

But the Supreme Court reversed that ruling in a 2013 judgment, reinstating Section 377. A two-judge bench claimed India’s LGBT community was only a “minuscule fraction of the country’s population” and disparagingly dismissed their demands for “so-called rights”. It held that the High Court was guilty of judicial overreach and the question of scrapping the law should have been left to parliament. Parliament has proved unwilling so far to take up the challenge.

Like many Indians, I found the Supreme Court’s 2013 ruling antithetical to India’s commitment to pluralism and contradictory to our constitutional democracy, which is built on embracing a multitude of identities despite the differences that divide us – sexual preferences included. I therefore introduced a bill to amend Section 377 to decriminalise all consensual sex between adults, arguing this was not about sex, but about freedom.

Sex before marriage ‘fudge’ gives hope to Indonesia’s persecuted gays

A vocal section of homophobic parliamentarians voted overwhelmingly against this measure. After even a debate on the bill was prevented, it became clear that the only hope for those who wished to uphold the freedoms of India’s gay citizens lay with the judiciary.

That hope was given fresh impetus in August 2017, when the Supreme Court, in a landmark ruling, held the right to privacy to be fundamental, and observed that “sexual orientation is an essential attribute of privacy”. The court also said the “right to privacy and the protection of sexual orientation lie at the core of the fundamental rights guaranteed by Articles 14, 15 and 21 of the Constitution”. The judgment implicitly overrules its 2013 verdict and suggests that, at least for consistency’s sake, that ruling will not survive this week’s review.

The bench will hear a number of petitions and interventions filed by 35 individuals and NGOs, including one signed by five well-known personalities claiming that their “rights to sexuality, sexual autonomy, choice of sexual partner, life, privacy, dignity and equality”, along with the other fundamental rights guaranteed by the constitution, are violated by Section 377.

The petitions cite a variety of constitutional grounds, including earlier Supreme Court verdicts granting equal social and legal status to the transgender community, and the current court’s own right to privacy judgment, as well as harking back to ancient Indian traditions reflected in the Vedas and Hindu texts like the Bhagavad Gita and the Kama Sutra.

Meet the brave drag queens tearing up Hanoi’s nightlife

The petitions before the court also speak with anguish of the various kinds of discrimination, sexual violence and distress that LGBT persons face on account of Section 377. While arrests are relatively infrequent, the existence of the law legitimises daily extortion, blackmail, workplace discrimination and abuse, creating a widespread sense of fear among India’s LGBT citizens. The court will have to rule on whether a law that essentially disenfranchises a section of Indians is consistent with democratic constitutional doctrine.

The government is in a quandary. It sought more time to formulate its position, but the Supreme Court refused to defer Tuesday’s scheduled hearing.

The ruling Bharatiya Janata Party (BJP) sees itself as a custodian of traditional Hindu values, but ancient texts reflect a culture that accommodates alternative sexuality. The prejudice against homosexuality is a legacy of British colonial rule; yet its bigotry has been so thoroughly internalised in India that scrapping Section 377 is seen by many in the BJP as part of the permissive liberalism they oppose. This is a betrayal of Indian values, an abandonment of our culture and history of tolerance in favour of a Victorian moral code imposed by the British.

There is ample historical precedent for the Supreme Court promoting and protecting human rights in India. The court has also been conscious of international human rights standards, which Section 377 violates. As long as Section 377 remains on the books, India is out of step with much of the international community and embarrasses itself before other democracies.

Vibrators to Hindu Twitter trolls, Indian film star Swara Bhasker not afraid of shaking things up

The Supreme Court faces a crossroads that can take us to one of two Indias: one in which the law enshrines Indian constitutional values of privacy, equality, dignity and non-discrimination for all our citizens, or one that allows the law to be an iron cage to oppress a section of our people. We must demand that our Supreme Court – if not our lawmakers – affirm a pluralist India that accommodates all identities within our country, lest we undermine the freedom of identity and expression that constitutes the backbone of Indian democracy.

We must uphold human rights, keep the government out of our bedrooms and defend a millennial Indian tradition of acceptance of difference.

The time for change was many years ago. But it is never too late to do the right thing. I believe, this time, the Supreme Court will.

Author and opposition leader Shashi Tharoor is the only parliamentarian to try to amend the laws against homosexuality