India's parliament has passed a controversial bill that seeks to change how transgender people are legally recognised and their right to self-identify, amid protests by opposition parties and the LGBTQ community.

The government says the changes will make welfare benefits more accessible and strengthen an existing law against exploitation and trafficking, but critics warn it could exclude many transgender, non-binary and gender-fluid people.

India is estimated to have around two million transgender people, though activists say the true number is higher and legal recognition remains uneven.

The legislation was approved by both houses this week and now needs the president's assent to become law.

In 2014, India's Supreme Court recognised transgender people as a "third gender" and affirmed their right to self-identify.