A city in central India has elected the country's first transgender mayor, nine months after a court ruled that transgender be recognized as a legal third gender, local media reported.

Madhu Kinnar, 35, won the mayoral election in Raigarh a city of about 150,000 in the mineral-rich state of Chhattisgarh on Sunday, beating her opponent from the governing Bharatiya Janata Party (BJP) by more than 4,500 votes, the Press Trust of India reported in a story published.

Television images showed a sari-clad Kinnar, with a large red bindi on her forehead, greeting supporters who placed marigold garlands around her neck.

Kinnar, who is from the Dalit community and used to earn a living singing and dancing in trains, said that she was overwhelmed by her election.

"People have shown faith in me. I consider this win as love and blessings of people for me. I'll put in my best efforts to accomplish their dreams," Kinnar was quoted as saying.

"It was the public support that encouraged me to enter the ... fray for the first time and because of their support only, I emerged as the winner."

Activists say there are hundreds of thousands of transgender people in India, but because they were not legally recognized, they faced ostracism, discrimination, abuse and forced prostitution.

Last April, India's Supreme Court recognized transgender as a legal third gender and called on the government to ensure their equal treatment.

While the landmark judgment was welcomed by human rights campaigners, many say it contradicts the court's reinstatement of a gay sex ban that has resulted in an increase in the persecution of lesbian, gay, bisexual and transgender (LGBT) people, forcing many to conceal their sexual identity.

Reuters