A woman holds a placard calling out the section of the Indian Penal Code making homosexuality illegal, during a gay parade in New Delhi in 2009. (Gurinder Osan/AP)

India is on the cusp of making a historic — and long overdue — decision on equality for the country’s gay and lesbian community.

In response to a series of public-interest petitions, the Supreme Court is set to decriminalize homosexuality and scrap a Victorian-era law that recommends imprisonment for same-sex relations.

This is no thanks to Indian politicians. There may have been some honorable exceptions, but for the most part, the country’s politicians have been shamefully unwilling to stand up for democracy’s fundamental principle of equality for all its citizens.

First, Prime Minister Narendra Modi’s government tried to postpone the hearing in the Supreme Court by asking for an adjournment. When that failed and the court pushed the government for a response on whether it would support or oppose giving LGBTQ citizens equal legal rights, the best it finally could manage was to say it would leave the outcome to the “wisdom” of the judiciary.

The ruling Bharatiya Janata Party’s (BJP) refusal to take a clear position on the anachronistic and discriminatory law is as expected. The party neither wants to be seen as homophobic in the eyes of the world nor does it want to risk offending its more conservative base. So it has waffled its way through the court proceedings, with some of its provocateur lawmakers even declaring the celebration of same-sex relationships to be anti-Hindu and a threat to national security.

If that sounds absurd, take a look at the monstrosity of the law itself. The offensive legal section (known as Section 377) not only effectively outlaws every Indian who is gay; it also makes anal sex between heterosexuals illegal. The 1861 legislation, a vestige of British colonial rule, prescribes life imprisonment or jail up to 10 years for “whoever voluntarily has carnal intercourse against the order of nature with any man, woman or animal.” The grotesque law has lagged behind cultural and social shifts in a society that has now seen the emergence of a robust and well-loved LGBTQ community in many major metropolitan cities.

But while many citizens are able to live openly gay lives without social stigma, millions of other Indians, especially in small towns and villages, bear the brunt of the discrimination. Apart from the pressure to “fit in” under pressure from a dominant narrative of heterosexuality, police are also able to use the provisions of the penal code as an excuse for blackmail and extortion. No surprise then that the Supreme Court asserted this week that it did not want “two gay men walking on Marine Drive (Mumbai’s main seaside road) holding hands to be arrested.”

If the present BJP government has shown a tragic lack of open-mindedness and fair play during the court hearings, the self-proclaimed liberal opposition, the Congress party, was no better when it was in power. In 2009, when Congress was at the helm of government, its ministries filed contradictory responses on whether India was ready to reform the law and the party’s top leadership did not take a categorical or united view. It was only after the Delhi high court first liberalized the law by calling the criminality a violation of fundamental rights that the Congress openly welcomed it. But in 2012, when a more conservative bench of the Supreme Court upheld the grossly inhumane law and dismissed gays, lesbians, bisexuals and transgender individuals as a “minuscule fraction” of India’s population, the Congress could have simply passed a law in Parliament that the court virtually dared it to. Of course, it didn’t.

Sadly, like the BJP now, the Congress then also passed the buck to the courts. Now, as the Supreme Court gets ready to overturn its own verdict and has revealed its intent to treat the issue of gay rights as human rights, one must ask: What is the point of Indian democracy if the men and women we vote into power can’t even do their basic jobs? How disingenuous for us to keep boasting about our identity as the world’s largest democracy when we can’t count on parliamentarians to stand up for egalitarianism and liberty?

These developments have only exposed the hypocrisy of India’s political class. They whine about how the judiciary encroaches upon their lawmaking territory. But when it comes to a basic issue of fundamental rights, our politicians have buried their spines in swathes of legal black robes, hoping that the judges will do what they themselves don’t have the courage to do.

It isn’t just political and social doublespeak that the gay rights movement has exposed; the debate has also revealed that Indian politicians do not have any understanding of the notion of consent or privacy in adult relations — whether homosexual or heterosexual. So while the Indian Parliament refused to legislate on giving equal rights to LGBTQ people, it was also fiercely adamant that it would not legislate on marital rape, insisting that this would endanger the institution of marriage. In other words, our politicians want to penalize you with prison time if you have consensual sex with a person of the same gender. But they will protect you if you rape your wife.

Even though it declined to take any position on gay rights, the government insisted that adultery must remain a crime (punishable with a sentence that can extend to five years in jail) to preserve the sanctity of marriage. Politicians are happy to sacrifice consent, free will and privacy at the altar of marriage.

It has been left to Indian courts to remind us that without privacy and individual freedoms, there is no democracy. This is an important lesson in an ugly age of increasing polarization and a time when cattle traders and Muslim men are being lynched by murderous mobs for the mere rumor that they eat beef or stock it at home.

Imagine the irony of a democracy in which what you eat can get you killed and who you have sex with can get you jailed. India is a nanny state.  And our politicians have some serious growing up to do.