COPENHAGEN, Denmark ā€” The Swedish parliament passed a law Wednesday lowering the age required for people to legally change their gender from 18 to 16. Those under 18 still need approval from a guardian, a doctor and the National Board of Health and Welfare.

No longer required is a gender dysphoria diagnosis, defined by medical professionals as psychological distress experienced by those whose gender expression does not match their gender identity.

Sweden joins a number of countries with similar laws including Denmark, Norway, Finland and Spain.

The vote in Sweden passed 234-94 with 21 lawmakers absent, following a debate that lasted for nearly six hours.

Sweden Democrats, the populist party with far-right roots that supports the government in parliament but is not part of the government, opposed the law.

Jimmie Akesson, leader of the Sweden Democrats, told reporters it was ''deplorable that a proposal that clearly lacks the support of the population is so lightly voted through.''

But Johan Hultberg with the Moderates of Sweden's conservative prime minister, Ulf Kristersson, called the outcome ''gratifying.'' Hultberg called it ''a cautious but important reform for a vulnerable group. I'm glad we're done with it."

Kristersson's center-right coalition had been split on the issue, with the Moderates and the Liberals largely supporting the law while the small Christian Democrats were against it.

Peter Sidlund Ponkala, chairman of the Swedish Federation for Lesbian, Gay, Bisexual, Transgender, Queer and Intersex Rights, known by its Swedish acronym RFSL, called the law's passage ''a step in the right direction'' and ''a recognition for everyone who has been waiting for decades for a new law.''

Elias Fjellander, chairman of the organization's youth branch, said it would make life better for its members. ''Going forward, we are pushing to strengthen gender-affirming care, to introduce a third legal gender and to ban conversion attempts,'' Fjellander said in a statement.

Last Friday, German lawmakers approved similar legislation, making it easier for transgender, intersex and nonbinary people to change their name and gender in official records directly at registry offices.

In the U.K., the Scottish parliament in 2022 passed a bill allowing people aged 16 or older to change their gender designation on identity documents by self-declaration. It was vetoed by the British government, a decision that Scotland's highest civil court upheld in December. The legislation set Scotland apart from the rest of the U.K., where the minimum age is 18 and a medical diagnosis is required.