Portugal's parliament has approved a new law making it easier for people to change their legal gender.
Citizens from the age of 16 will now be able to change their gender and name in documents without the need of a medical report.
Activists welcomed the "groundbreaking" law, saying it respected the right of self-determination.
Critics were against allowing changes without a medical report and lowering the minimum age, currently at 18.
Lawmakers celebrated the vote of approval - by 109 votes in the 230-seat parliament - with a standing ovation.
Isabel Moreira, an MP from the Socialist Party, called this a "historic day that honours every trans person and their families".
Vânia Dias da Silva, from the right-wing party CDS-PP, which opposed the bill, said: "We disagree with this law. [Those who are] 16 years old can't marry, drink, or drive, so they shouldn't be able to make a decision with such definite and serious consequences."
For those aged between 16 or 18, the change of gender will need to be approved by their parents or legal representatives.
Under the old law, those wanting to change their gender on official documents had to present a medical report and be at least 18 years old.
A tradition of liberal liberties
By Mia Alberti, Lisbon
Until 2011 Portugal had no legislation regarding the recognition of transgender identity. Back then to legally change their identity, transgender people had to be sterilised and sue the state for wrongful attribution of identity. That year Portugal approved the current Gender Law, widely celebrated by LGBT activists.
Since then, 485 people have changed their legal name and gender, according to the Ministry of Justice. There is no data on how many transgender teenagers are in Portugal. However, Zélia Figueiredo, a psychiatrist and expert in sexology, says the transgender teens seeking her "are increasingly younger".
The Gender Law follows a number of other liberal law changes that have reshaped the social landscape in Portugal: drug decriminalisation (2001), same-sex marriage (2010), same-sex adoption (2016) and surrogacy (2016).
The legalisation of the medicinal use of marijuana and euthanasia are already scheduled for debate in parliament.
Katrin Hugendubel of ILGA-Europe, an LGBT rights advocacy group, said: "People will be able to change their legal gender through a procedure based on self-determination.
"This means that the law finally recognises and respects that trans people themselves know best who they are and how they identify."
Only five other European countries have a model based on self-determination, according to the group: Malta, Norway, Denmark, Ireland and Belgium.
In the UK, individuals need to be 18 years old to require a legal change of their gender, a process that can take up to five years and requires a diagnosis of gender dysphoria from a psychiatrist.
The new Portuguese legislation also outlaws unnecessary surgery on intersex children.
It now needs to be signed by President Marcelo Rebelo de Sousa to come into effect.