New Delhi's highest court issued a landmark ruling Thursday that decriminalised gay sex between consenting adults in India by declaring a colonial-era ban on homosexuality unconstitutional.

The decision by the Delhi High Court was hailed by gay activists here as a historic step in their struggle to achieve equal rights in a conservative society that largely regards homosexuality as a taboo illness.

The court ruled that the existing ban on homosexual acts was discriminatory and therefore a violation of individual rights guaranteed by the constitution.

Homosexuality has been illegal in India since 1860 under a statute introduced by British colonial rulers that banned "carnal intercourse against the order of nature." Conviction carried a fine and maximum 10-year jail sentence.

Although prosecutions were rare, gay activists said police used the law to harass and intimidate members of their community.

"We are all very thrilled and happy," said Anjali Gopalan, executive director of the Naz Foundation, a gay advocacy group that had petitioned the court to overturn the statute.

"This is just the beginning. The battle will continue till every member of this community gets all the rights that an ordinary citizen has," Gopalan told reporters.

While the ruling is non-binding outside the Indian capital, it effectively leaves the government with the choice of appealing to the Supreme Court or repealing the law nationwide.

The decision was criticised by religious groups, particularly leaders of India's Muslim and Christian communities who had staunchly opposed the move to legalise gay sex.

"This is absolutely wrong," Ahmed Bukhari, imam at the Jama Masjid in Delhi, India's largest mosque.

"We will not accept any such law," Bukhari said.

Father Babu Joseph, spokesman for the Catholic Bishops Conference of India, said the court's decision would make no difference to the Church's stand.

"While respecting the judgement of the court, we still hold that homosexuality is not an acceptable behaviour in society," he said.

In recent years, India's largely closeted homosexual community has raised its profile, organising gay pride marches in major cities such as New Delhi and Mumbai.

"I feel very proud to be an Indian today," said openly gay fashion designer Wendell Rodericks.

The Indian government has offered mixed messages on the issue, with some ministers speaking out in favour of the petition, only to be contradicted by others in the cabinet.

Law Minister Veerappa Moily declined to offer any immediate comment on Thursday's ruling, telling reporters at parliament that he needed to study the text properly.

Ashok Row Kavi, a prominent gay rights campaigner since the 1970s, told AFP from Bangkok, where he was attending a UN AIDS conference, that the court's decision opened a new era.

"I will return to India as a free gay man ... free from extortion, violence and blackmail from the police, free from discrimination and free to access all health services," Kavi said.

The UN AIDS agency had supported the petition arguing that decriminalising homosexuality would help India combat the spread of HIV/AIDS.

India has an estimated 2.5 million people living with HIV.

New York-based Human Rights Watch also welcomed the ruling, saying it was overdue.

"This legal remnant of British colonialism has been used to deprive people of their basic rights for too long," said Scott Long, director of the watchdog's Lesbian, Gay, Bisexual, and Transgender Rights Program.

"This long-awaited decision testifies to the reach of democracy and rights in India," Long said.

Bollywood actress and gay rights campaigner Celina Jaitley said the ruling was historic.

"I'm overwhelmed," Jaitley told AFP in Mumbai.

"It's great not to be criminalised for being a human being and what you do in your bedroom," she added.