In many European countries, transgender people who update their driver’s license have to be sterilized first

For many transgender people in Europe, something as simple as changing their name or gender on a driving license requires an invasive—and offensive—medical procedure.

Of the 47 countries currently signed up to the European Convention on Human Rights, 22 countries (pdf) require transgender people to undergo sterilization before allowing them to change their name or gender on legal documents.

The practice could finally be coming to an end. The European Court of Human Rights issued a ruling last week that making recognition of sexual identity conditional on sterilization violates the “right to respect for private life.”

In the case, three French nationals complained they were not able to change their sex on legal documents without undergoing sterilization. France has since moved away from the practice with new legislation last year that allowed transgender people to legally change their gender without undergoing sterilization. Still, in upholding their complaint, the court set a legal precedent that calls for the remaining 22 countries to change their laws.

A string of Western European countries have recently outlawed mandatory sterilization, as awareness has grown about transgender rights. After France, the most recent country to abolish the practice was Norway in 2014, followed by Sweden, Germany, and Austria. Last month, Sweden offered compensation to transgender people who were forced to undergo mandatory sterilization to legally change their gender.

According to advocacy group Transgender Europe, the European countries that currently require sterilization are: Armenia, Azerbaijan, Belgium, Bosnia and Herzegovina, Bulgaria, Croatia, Czech Republic, Finland, Georgia, Greece, Latvia, Lithuania, Luxembourg, Montenegro, Romania, Russia, Serbia, Slovakia, Slovenia, Switzerland, Turkey and Ukraine.

Many of the sterilization laws in these countries date back to the 1970s, when being transgender was largely considered a problem and sterilization a test of a person’s seriousness about wanting to “fix” it. Sterilization also ensured that a transgender person legally registered as a man didn’t give birth to a child.

The procedure involves removing a person’s reproductive organs, either the testes or the uterus and ovaries. In countries where sterilization is required to change documents, transgender people who refuse to undergo the procedure must continue using documents that do not reflect their updated gender and name. Advocates warn that the mismatch leads to logistical problems and humiliation when, for instance, boarding planes and retrieving packages.

“Today is a victory for trans people and human rights in Europe,” Julia Ehrt, who leads Transgender Europe, said in a statement. “This decision ends the dark chapter of state-induced sterilization in Europe.”

The European court’s ruling has limitations. While it may influence laws in other countries, it is only legally binding in France. And while the court ruled against sterilization, it did not strike down requirements that transgender people undergo medical and psychological examinations before changing their gender, which human rights advocates argue are also cruel and unnecessary.

home our picks popular latest obsessions search