The case of Section 377 presents India with a moral predicament. It was not ancient India that proscribed homosexuality; the English colonizers gave India the law. India made it its own; the English have long since disowned it. Is India obliged forever to revise its morality in accordance with changing norms in the West?

The two lawyers had thought hard about how India could find its own moral center. It is a country where young heterosexual couples face almost as much pressure as homosexual ones over love that crosses caste or religious lines. Just this month, a low-caste man in Tamil Nadu state, in the southeast, was hacked to death for marrying above his station. Mr. Narrain wondered if, in this context, it might be possible to conceive of a right broader and more basic: “Could one talk of a ‘right to love’ in the Indian constitutional framework?”

I had never heard of such a thing. A right to love? Does it exist anywhere?

“No,” Mr. Sheikh said, “and till now it has largely been regarded as a T-shirt right.” But the day before, the two lawyers had been at a conference, and the language of a right to love had come up — an enshrined right for any person to love and make a life with the person of her or his choosing.

This would be momentous in India, where society still views marriage as a contract between families. But a right to love would be revolutionary for the whole world and would make India something of a pioneer in international human rights. It would not merely help India find its moral center; it would help the world forge a path forward.

A right to love would always have been a dream, but in the present climate in India, even basic rights are out of reach. A majoritarian wave is sweeping across the country. Prime Minister Narendra Modi’s government is seeking to impose its politicized version of Hinduism not just in people’s bedrooms but in their universities and even in their diets. Last year, some states where Mr. Modi’s party came to power introduced new laws banning the consumption of beef. At this year’s gay pride event, Mr. Sheikh carried a new sign: “Beef Eater/Man Lover.”

Last December, the opposition leader Shashi Tharoor introduced a bill in Parliament that would decriminalize all consensual sex between adults, regardless of gender. The ruling party defeated it 71-24. He reintroduced it earlier this month, and it was defeated again. It is now up to the judiciary to lead the way toward gay rights. Mr. Sheikh hopes that when the Supreme Court rehears the case on Section 377, it will overturn the law.

The gay rights movement has often dreamed biggest at the worst of times. This is a bad time in India, a time of curtailed freedoms and creeping authoritarianism. In such an atmosphere, there is something wonderful in the idea of a court in this once great democracy replacing an outdated Victorian law with something as simple and attractive as an unalienable right to love.