Hanoi - Vietnam on Tuesday passed a landmark law enshrining rights for transgender people in a move advocacy groups say paves the way for gender reassignment surgery in the authoritarian communist nation.
Such operations are currently illegal, forcing people to travel to nearby Thailand for the surgery.
The legislation will allow those who have undergone gender reassignment to register under their new sex. The law will come into effect early in 2017 after 282 of 366 lawmakers voted in favour.
"Individuals who undergo transgender change will have the right to register" under their new gender with "personal rights in accordance with their new sex", reported the state-controlled VNExpress website, citing a National Assembly report.
The law is an attempt to "meet the demands of a part of society... in accordance with international practice, without countering the nation's traditions", said the report from the Vietnamese parliament.
Also read: MultiChoice pulls off offensive transgender child movie
The country's lesbian, gay, bisexual and transgender (LGBT) community welcomed the move, saying it offered essential new rights.
"Now people accept there is a transgender community, their legitimate rights will be ensured," said Nguyen Hai Yen from ICS, a local LGBT organisation which estimates there are around 270,000 transgender people in the country of 90 million.
The law is also being seen as a crucial step towards allowing gender reassignment operations.
"People will no longer have to travel abroad for transgender surgery," said Luong The Huy, LGBT manager at Vietnam's Institute for Studies of Society, Economy and Environment.
Homosexuality remains taboo but not illegal in Vietnam, and a series of gradual advances have seen the nation move towards more progressive views in its approach to sexuality.
Its main cities have small but vibrant gay night life scenes while in 2013 the government abolished fines for same-sex wedding parties, symbolic unions that lack full legal recognition.
LGBT groups are still lobbying for Vietnam to legalise same-sex marriages after Hanoi briefly considered changing the law three years ago.