Delhi: India's top court has recognised the country's long marginalised transgender community as a third gender and, in a landmark judgment lauded by human rights groups, called on the government to ensure their equal treatment.

There are hundreds of thousands of transgenders in India, say activists, but because they are not legally recognised, they are ostracised, discriminated against, abused and often forced into prostitution.

"Recognition of transgenders as a third gender is not a social or medical issue but a human rights issue," the Supreme Court's two-judge bench said in its ruling.

"Transgenders are also citizens of India. The spirit of the constitution is to provide equal opportunity to every citizen to grow and attain their potential, irrespective of caste, religion or gender."