On a bright January day, a group of around 200 lesbian, gay, bisexual, and transgender (LGBT) activists dressed in black, to symbolize mourning, gathered at Jantar Mantar, a site in New Delhi that frequently plays host to protests and demonstrations. Nearby, khaki-clad police officers warily observed the spectacle. The activists clutched rainbow flags to their chests and shouted slogans.

“My gender, my right! My sexuality, my right!”

“We want justice: you can’t stop our love!”

The grim mood represented a dramatic turnaround. Just a few weeks earlier, more than a thousand people had filled the same location to take part in the sixth annual Delhi Queer Pride Parade, one of the city’s biggest street parties of the year. That celebration was a distant memory for Roshini, a young woman who was at the January protest with her partner. She had a black band tied around her arm and tears in her eyes. “There will be no parade next year,” she said. “That was my last parade, at least for a long while.”

Between those two gatherings, the Supreme Court of India had issued a ruling that hobbled India’s fledgling gay rights movement and left the country’s LGBT population fearful, angry, and depressed. Last December, in a landmark judgment, the Supreme Court overturned a 2009 ruling by a lower court that had decriminalized consensual homosexual sex between adults. The 2009 ruling had come in response to a lawsuit filed eight years earlier by the Naz Foundation (India) Trust, a gay rights and HIV/AIDS advocacy organization. The court had held that Section 377 of the Indian Penal Code, which prohibits sexual activities “against the order of nature” and which was originally established by India’s colonial British rulers in 1861, violated the constitution by depriving citizens of their rights to equal treatment under the law, privacy, and freedom of expression.

Although relatively few people had ever been prosecuted under Section 377, the law threatens violators with a fine and a prison term of ten years -- or even a life sentence. The 2009 ruling that found Section 377 unconstitutional represented a major turning point for India’s LGBT community, which hailed the decision as a moral victory. Prior to the fight against the law, India’s gay rights movement had been limited to small pockets of activism around the country; the lawsuit represented its first highly visible, collective effort. Shortly after the decision was announced, Anjali Gopalan, the director of Naz India, told me, “The judgment is fabulous, and it will be hard to counter it legally. Religious groups have their own point of view, but they can’t impose it on us. We are a secular country.”

That confidence turned out to be misplaced. So, too, was the belief among social liberals and younger Indians that the 2009 verdict had reflected wide, if tacit, acceptance of homosexuality in their society. In fact, far more Indians were dismayed by the 2009 verdict than applauded it. A nationwide poll conducted by the CNN-IBN television network and the Hindustan Times shortly after the court issued its ruling found that 73 percent of Indians believed that homosexuality should be illegal. A coalition of conservative religious and political groups immediately appealed the decision to the Supreme Court, arguing that homosexuality was an offense against public morality and Indian cultural values.

Last December, the Supreme Court sided with them. In a strongly worded decision, a two-judge panel of India’s highest court overturned the earlier ruling, declaring that only “a minuscule percentage” of Indians are homosexual and dismissing the “so-called rights of LGBT persons.” The court also noted that fewer than 200 people had been prosecuted under Section 377 in the more than 150 years since the law was put in place. Such a low rate of prosecution, the court averred, did not provide a “sound basis” for holding the law unconstitutional.

Many members of India’s legal establishment criticized the judgment, claiming it was motivated more by the judges’ personal views than by sound jurisprudence. “It is the duty and responsibility of judges to rise above their own biases and behave like true judges,” said Indira Jaising, a prominent Indian lawyer who currently serves as a solicitor general. The decision, she said, is “a throwback to a bygone era where there was no concept of human rights.”

Nevertheless, conservative forces saw the ruling as a triumph of traditional values over secular, liberal attitudes, which they claim are imports from the West. “We can’t bring Western culture into our society,” declared Mukhtar Abbas Naqvi, a spokesperson for the Bharatiya Janata Party (BJP), the right-wing Hindu nationalist party that leads the opposition in the Indian Parliament and which supported the Supreme Court’s decision.

But conservatives such as Naqvi have it backward: it is homophobia, not homosexuality, that is primarily a foreign import. And although conservatives might be able to exploit anti-gay sentiments for short-term political gain, they are likely to find themselves on the wrong side of history sooner than they might expect, as fundamental changes now under way within Indian society will almost certainly lead to more tolerance of sexual minorities in the not-too-distant future.

NO COUNTRY FOR GAY MEN?

The idea that homosexuality is somehow un-Indian might surprise anyone who has ever visited one of the many Hindu temples built all over the country as far back as the fourth century, the walls of which are covered with carvings that depict same-sex couples copulating. Indian epics and chronicles are replete with accepting references to homosexuality, including one version of the Ramayana, a foundational text of Hinduism written in the fourteenth century that relates a sexual encounter between two women. The Kamasutra also refers directly to gay sex. And although some of the foundational texts of Hindu theology, such as the Manu-smriti (“Laws of Manu”), do forbid homosexuality, they do so quite mildly, recommending minor penalties, such as a cold bath, for homosexual behavior. Such tolerance in premodern Indian culture stands in stark contrast to the homophobia that prevailed during the same period in Europe and North America, where “sodomites” were often punished with persecution, torture, or execution.

Precolonial India was generally less prudish about all forms of sexuality than most Western societies during the same period. In ancient Indian culture, sex was not taboo. It was discussed openly in books (religious and secular) and depicted in paintings, hymns, and folktales. Hindu gods were frequently depicted in romantic pairs, and ancient Indian temples are full of erotic images of deities and other divine beings. This is not to say that precolonial India was always an oasis of tolerance for sexual minorities. For instance, during the Mughal era (1526–1857), homosexuals were sometimes punished with flagellation and even death, owing to extreme interpretations and applications of Islamic law.

But it was only under direct British colonial rule, which began in 1858 and lasted until India won its independence in 1947, that the minor strain of homo­phobia in Indian tradition became a dominant theme. “In the late eighteenth and early nineteenth centuries, India’s downhill sexual journey began,” said Wendy Doniger, a religious historian at the University of Chicago who specializes in Hinduism and India. “The British came with all these preconceptions about lascivious Orientals, who were seen as overerotic, or actually feminine in a way that made them supposedly unfit to govern.” For Indians hoping to advance in the colonial system, she explained, “showing yourself to be asexual or antisexual or puritanical also showed yourself to be fit to run your own country.”

In an effort to align Indian culture more closely with British ideals, modernize Indian society, and ingratiate themselves with the colonial ruling class, several nineteenth-century Indian social reformers set about excising eroticism, including homosexuality, from Indian literature, education, and religion. Partly as a result of such efforts, a repressive attitude toward sexuality in general and homosexuality in particular became deeply intertwined with modern Indian nationalism. Many prominent Indian nationalists, including “the father of the nation,” Mahatma Gandhi, subscribed to such views. (Gandhi took a vow of celibacy at the age of 36 and passionately preached the virtues of abstinence.) British influence was not the only factor driving these changes in Indian society, but it played a major role, and by the middle of the twentieth century, the country had become far less liberal on matters of sexuality.

A SEXUAL REVOLUTION

In the wake of the Supreme Court’s decision in December, the question of homosexuality’s legality passed to the Indian Parliament. (Technically, it is possible that the Supreme Court will review its own ruling, but most experts believe that is unlikely.) The best hope that LGBT rights advocates have of seeing gay sex decriminalized is for Parliament to amend the Indian Penal Code so as to invalidate Section 377 -- in other words, to explicitly endorse the right of consenting adults to have homosexual relations.

This change is unlikely to happen anytime soon, especially because of the hotly contested national elections coming later this year. Leaders of the ruling Indian National Congress -- including Sonia Gandhi, the party’s president, and her son, Rahul Gandhi, its vice president, who are locked in an increasingly desperate bid to hold on to power -- have criticized the Supreme Court’s verdict and urged Parliament to act. But the party lacks political muscle these days. Manmohan Singh, the country’s once-popular prime minster, is now widely perceived as a failure thanks to India’s recent corruption scandals and economic stagnation, and the party lost elections in four key states last December. Narendra Modi, the chief minister of Gujarat, who will be running as the BJP’s candidate for prime minister later this year, has remained silent on the Supreme Court’s verdict. But Rajnath Singh, the BJP’s president, has announced that the party backs the court’s decision and has affirmed the party’s position that homosexuality is “unnatural.” Several Muslim political leaders have also expressed support for the Supreme Court’s verdict, as have some leaders of khap panchayats, the village councils that attempt to regulate social behavior in rural India and that play an influential role in elections.

Yet when it comes to sexual politics, these conservative forces represent an outmoded close-mindedness that is being pushed aside as Indian society barrels into the twenty-first century. India is undergoing a sexual revolution of sorts, of which the fight for LGBT rights is only one part. As a result of technological, economic, and political changes during the past decade, India is witnessing a dramatic shift in values related to sex and sexuality. The most easily observable effect of this shift is the way sexuality has once again become part of the Indian visual and media landscape. From racy advertisements to Bollywood movies with graphic sex scenes, sexuality dominates billboards and screens that just a decade ago might not have even shown a couple kissing.

Behavior and attitudes are also trans­forming. Over the course of more than 500 interviews about sex and sexuality that I have conducted in recent years with people all over India, I discovered a distinct generational shift, with young people, especially those in cities, holding decidedly more liberal views than their parents. Others have reported similar findings. According to Shaifali Sandhya, a professor at the Alder School of Professional Psychology in Chicago who has researched sexuality and marriage in India, around 75 percent of young people polled in urban areas reported having had sex prior to marriage. In 2012, a survey conducted by Outlook, one of India’s leading magazines, reported that 30 percent of Indian city dwellers found nothing wrong with homosexuality.

It is within the context of such changes that India’s gay rights movement found its voice. In recent years, LGBT festivals and parades have taken place all over the country, and thousands of young people in their 20s and 30s have come out of the closet. LGBT advocacy groups have sprouted up not only in Mumbai and New Delhi but also in small cities such as Pondicherry, Vadodara, and Vishakhapatnam. Every major city now has an openly gay nightlife, supporting a microeconomy of professional party organizers and clubs with names such as Boyzone and Desi Dykes.

The rapid spread of modern communications technology throughout India has propelled the country’s gay movement. The Internet and cell phones have helped LGBT Indians connect, and the anonymity of digital life has made it easier for still-closeted gays and lesbians to find partners. “The Internet has changed everything,” said Ashok Row Kavi, a veteran gay rights activist. “You go on PlanetRomeo” -- a popular gay dating website -- “and there are around 90,000 men cruising the Internet at any given time in India. Of these, 9,000 are in Bombay alone.”

ONE STEP BACKWARD, TWO STEPS FORWARD

This opening up has also had a subtle but profound effect on Indian corporate culture. According to an LGBT resource guide jointly published and distributed in India in 2012 by Goldman Sachs, Google, IBM, and the corporate social-responsibility organization Community Business, LGBT Indians make up about five to ten percent of India’s corporate work force. Around 80 percent of those workers report having heard homophobic comments or jokes or other anti-gay language at their workplaces. But in the wake of the 2009 ruling, the Indian affiliates of U.S.-based companies such as Google, IBM, and Infosys instituted LGBT-friendly hiring and workplace policies or reaffirmed their commitments to existing ones.

“Since the Delhi High Court judgment in 2009, companies and employees are hungry to find ways to ensure they operate in an inclusive environment,” said Bunty Bohra, CEO of Goldman Sachs India. “If your company is not gay-friendly, you may start losing employees, future clients, and revenue. It makes good business sense to be inclusive.” This change in corporate culture, which reflects deeper social trends and market incentives and involves a major commitment of resources, is unlikely to be undone by the Supreme Court’s decision.

That decision’s most immediate impact will likely be on the fight against HIV/AIDS. The growing movement in India for awareness and prevention of the disease has played an important role in campaigning for LGBT rights -- and vice versa. But with the Supreme Court’s decision, much of the funding that LGBT advocacy groups had won from both nongovernmental organizations and state institutions might dry up. Kavi fears that the verdict will push gay men back into the shadows and out of the reach of organizations that encourage safer sex and health education, which themselves will struggle just to stay afloat. Such groups are crucial in stopping the spread of HIV/AIDS in India, where, according to Kavi, most gay men still do not use condoms and half the men who use gay dating websites are married -- and sexually active with their wives.

There is little doubt that in the short term, the recriminalization of homosexual relations will stifle India’s LGBT movement and keep many Indians from venturing any further out of the closet. But in the longer term, Indians on the sexual margins have reasons for hope. The country’s current population includes 315 million people who are between the ages of ten and 24; by 2020, India will be the youngest nation in the world, with an average age of 29 (compared with 37 in China and the United States, 45 in parts of Europe, and 48 in Japan). Given the far greater acceptance of homosexuality and LGBT people among young Indians and the ongoing liberalization of Indian sexual mores, the ruling on Section 377 is more likely the death rattle of India’s old sexual politics than a herald of new sexual repressiveness.