Transgender people in India no longer have to categorize themselves as “male” or “female” in official documents.

India’s Supreme Court issued a landmark ruling Tuesday that allows hundreds of thousands of transgender people to identify themselves as a third gender. Human rights groups are lauding the decision as historic and groundbreaking.

“It is the right of every human being to choose their gender,” the court wrote.

“Recognition of transgenders as a third gender is not a social or medical issue but a human rights issue,” Justice K.S. Radhakrishnan, one of the two head judges on the Supreme Court bench, told the court.

The high court has ordered the government to allocate public sector jobs to transgender people, known as “hijras” and include them in welfare programs.

The court ruling is a result of a petition filed by a group of transgender people that argued their community was marginalized both economically and socially. Arguing that their non-legal status has led to further discrimination, hate crimes, and lack of access to jobs and education, the petitioners asked the government to grant them formal recognition for the first time in India’s history.

“Transgenders are also citizens of India,” said the court in its order. “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.”

Federal and state governments will need to recognize the third gender on birth certificates, passports and driving licenses. The government will also consider transgender individuals a minority to help fill quotas in jobs and schools.

One of the petitioners in the case, transgender activist Laxmi Tripathi, told reporters outside the Delhi courthouse that the court’s decision will advance equality in India.

“Today, for the first time I feel very proud to be an Indian,” Tripathi said.

While India now recognizes the transgender community as a third gender, the ruling only applies to transgender people and not gays, lesbians or bisexuals. In December, the Supreme Court reversed a 2009 court order that decriminalized homosexuality, reinstating a ban on gay sex.

India’s general elections will be held on May 16, and LGBT rights activists hope the new parliament will repeal the anti-gay law.