A Delhi court rules that punishment for sexual relations between consenting adults is a violation of constitutional rights. The ruling applies to Delhi but is seen as a trendsetter for the country.

NEW DELHI — The Delhi High Court issued a landmark ruling Thursday decriminalizing homosexuality, a move that could bring more freedom to millions of people in this deeply conservative nation.

The ruling said that treating relations between consenting adult homosexuals as a crime is a violation of basic human rights safeguarded under the Indian Constitution.

The court decision amending an 1860s-era British Empire statute ostensibly applies only to Delhi. But activists said that given the capital territory's leadership position, they expect the ruling to influence courts across the country.

"I think this is quite fantastic," said Anjali Gopalan, director of the Naz Foundation, an HIV/AIDS awareness group, one of the parties that submitted the lawsuit eight years ago. "It's a big step forward, although there are many more steps ahead."

The decision inspired celebratory rallies in Bangalore, Hyderabad, Mumbai, Chennai and other major Indian cities.

"This is going to impact the whole country," said A.J. Hariharan, founder of a gay rights group in Chennai, formerly Madras. "This will change the lives of millions of gays and lesbians in India."

About 200 gays gathered, cheered and hugged at Delhi's Jantar Mantar monument, a gathering area for all sorts of protests. They were mobbed by nearly as many reporters.

"There's been a huge change in the past five years in India," said Andi, 37, a photo editor known professionally by a single name, who was out celebrating. "I'm now willing to say straight out that I'm queer. And more people are willing to accept it."

Religious groups condemned the decision, pledging to pressure the ministries and courts to reverse it. An appeal would send the issue to the Supreme Court.

"This is dangerous and harmful for Indian society," said Uzma Nahid, member of an Islamic law board, who promised to join Christian and Hindu groups in fighting the change. "Western countries allow these things and you see the effects -- people take drugs, parents don't care about their children. If the father doesn't concentrate on his wife, this could undermine the whole family."

For many homosexuals, the immediate effect on their personal lives will not be dramatic. There's still a strong social stigma here against gays and lesbians, with young people often pressured to marry early and produce grandchildren.

"There's still a mental block," said Rahil Zafar, 22, a student, wearing a bandanna over his face to hide his identity from television cameras as he celebrated. "I don't want my family to know. They keep the pressure on me."

Zafar said he bats down the marriage proposals his parents present: " 'It's too early to get married,' 'I don't like the way this one looks, that one doesn't seem right,' " he said he tells them. "My family still doesn't suspect I'm gay."

One change the ruling could bring soon, activists said, is in dealings with corrupt police officers, who reportedly sometimes extort money by threatening to apply the law or "out" gays and lesbians to friends or family.

Akash Verma, 26, a Delhi resident, said he was returning home late one night in 2004 when two intoxicated policemen who suspected he was gay stole about $20 from his bag and demanded sex, but released him. Verma said other officers later "strongly advised" against filing a complaint.

Although Verma's account could not be independently verified, gay rights activists said such behavior by police is not uncommon. Rajan Bhagat, a Delhi police spokesman, declined to comment on allegations of abuse.

The decision by the Delhi court applies to Section 377, a British-era anti-sodomy law that forbids "carnal intercourse against the order of nature."

The law, exported to India during British colonial rule, makes no distinction between consensual and non-consensual activities, includes homosexuality in the same category as pedophilia and defines rape as occurring only between a man and a woman, with no provision for sexual violence against men. Under the law, sex between homosexuals may result in up to 10 years of imprisonment.

Versions of the law remain in 17 African, 13 Caribbean and 18 Asian and Pacific nations and colonies, according to Human Rights Watch, which expressed hope that India's reform would inspire others to change their laws.

Even as many Indians struggle to tell their families they are gay, few have had as much at stake as Manvendra Singh Gohil, 42, the only son and heir to the fortunes of the former Rajpipla principality in western India's Gujarat state.

Gohil came out in 2006, only to learn a short while later that his mother had disowned him.

He told local reporters that he realized at age 10 that he was gay and struggled with his identity for three decades, even agreeing in 1991 to an arranged marriage. It ended in divorce two years later, however, after he told his wife that he was gay.

In 2002, he finally told his parents after suffering a nervous breakdown. His decision to go public in 2006, and state that homosexuality in Indian royal families wasn't particularly rare, resulted in him being disowned and being burned in effigy by angry relatives.

Gohil said Thursday through his publicist that, after the initial hardship, he doesn't regret his decision to stop living a double life. His family has started to change, in keeping with developments in Indian society.

"He recently started talking with his dad again, although his mother will take a little more time," said Deepak Kashyap, his publicist. "And he's started going back to the palace, although he still doesn't stay overnight."