STOCKHOLM (Reuters) - Sweden’s center-left government proposed legislation on Monday that would grant compensation to transgender men and women who had to undergo mandatory sterilization in order to have their sex legally reassigned.

Transgender Swedes had to be sterilized before they could legally change their gender until 2013. The government’s bill would allow an estimated 800 people to claim 225,000 crowns ($26,000) each in compensation from the state.

“Sterilization as a condition to obtain a change of gender was an expression of a view that society today distances itself from,” Healthcare Minister Gabriel Wikstrom said in a statement.

Maria Sundin, a transgender activist and former chairwoman of Transgender Europe, was forced to undergo sterilization in 1999.

She said of the bill: “It is a very positive outcome. It is vindication, and very positive that we didn’t have to take it to court.”

The Swedish Federation for Lesbian, Gay, Bisexual, Transgender and Queer Rights had long threatened to sue the government over the sterilizations and wanted 300,000 crowns in compensation for each affected individual.

“It is very welcome that the government, the first in the world, is paying compensation in recognition of the crimes committed by the state against transgender people,” it said in a statement.

Sweden - often viewed as a bastion of tolerance - has a dark history of sterilization that dates back to the 1930s when Roma were often targeted in drives for racial purity.

Mental disability, institutionalization, or simply having what authorities deemed to be too many children, could also result in sterilization during those decades.

An estimated 63,000 people - the vast majority of them women - were sterilized between 1935 and 1975, according to a government report published in 2000. Roughly half of these procedures, primarily during the first 20 years, were done by force or coercion.

Many European countries, such as Finland, Switzerland and Greece, still require transgender people who want to legally change their gender to undergo sterilization, according to Transgender Europe.

The practice of involuntary sterilization has been widely condemned as a human rights violation, including by the United Nations.

In Europe, transgender people are twice as likely as gay people to be attacked, threatened or insulted, according to a European Union report published in December 2014.

($1 = 8.7833 Swedish crowns)