The Centre and States were also directed to take steps for bringing the community into the mainstream by providing adequate healthcare, education and employment.
A bench of Justices K S Radhakrishnan and A K Sikri directed the government to take steps for granting recognition to transgenders as a separate third category of gender after male and female.
The bench also said they are the citizens of the country and have equal rights to education, healthcare and employment opportunities like other people belonging to male and female gender.
The apex court expressed concern over transgenders being harasssed and discriminated in the society and passed a slew of directions for their social welfare. The apex court said that trangenders were respected earlier in the society but situation has changed and they now face discrimination and harassment.
It said that section 377 of IPC is being misused by police and other authorities against them and their social and economic condition is far from satisfactory.
The bench clarified that its verdict pertains only to eunuchs and not other sections of society like gay, lesbian and bisexuals who are also considered under the umbrella term 'transgender'.
The bench said they are part and parcel of the society and the government must take steps to bring them in the main stream of society.
The apex court passed the order on a PIL filed by National Legal Services Authority (NALSA) urging the court to give separate identity to transgenders by recognising them as third category of gender.
Welcoming the Supreme Court decision, Lakshmi Narayan Tripathi, transgender rights activist said, "the progress of the country is dependent upon human rights of the people and we are very happy with the judgement as the Supreme court has given us those rights."