The UN Human Rights Council has condemned the IAAF's attempt to regulate the testosterone levels of female athletes, as nations unanimously backed the cause of South African runner Caster Semenya.
In a rare intrusion in the world of sport, the United Nations' top rights body has passed a resolution stating that the International Association of Athletics Federations (IAAF) may be in breach of "international human rights norms and standards".
The South African-led resolution called on governments to ensure sports organisations avoid "practices that force, coerce or otherwise pressure women and girl athletes into undergoing unnecessary, humiliating and harmful medical procedures".
It was adopted by consensus by the council's 47 members on Thursday.
South Africa's ambassador to the UN in Geneva, Nozipho Joyce Mxakato-Diseko, told AFP she was "pleasantly delighted" the resolution was approved by acclamation.
"It means that in essence all the members of the UN agree with us," Mxakato-Diseko said.
"They agree that what is being required of Caster Semenya is in violation of international human rights law."
"Caster is a woman," the ambassador added. "She cannot be told by anybody on the basis of ... dubious scientific evidence that she is not a woman."
The IAAF said the authors of the resolution did not understand the regulations in question.
"There are many generic and inaccurate statements contained in the motion presented to the UN Human Rights Council so it is difficult to work out where to start," the IAAF said in a statement.
It argued that without rules to protect female sport, "we risk losing the next generation of female athletes, since they will see no path to success."
The IAAF is looking to force so-called "hyperandrogenic" athletes or those with "differences of sexual development" (DSD) to seek treatment to lower their testosterone levels below a prescribed amount if they wish to continue competing as women.
World athletics' governing body has argued the moves are necessary to create a "level playing field" for other female athletes.
Double Olympic champion Semenya, who has dominated the women's 800 metres over the last decade, has filed a challenge against the IAAF at the Court of Arbitration for Sport.
Her testosterone levels are not publically known.
But from 2011 to 2015, Semenya took hormone suppressants to bring her in line with testosterone limits imposed at the time.
During that five-year period, her best times in the 800m were a second or two slower than before and after.
The sports court is due to deliver a decision on her challenge by the end of April.
UN rights chief
The council resolution also called on the UN High Commissioner for Human Rights, Michelle Bachelet, to write "a report on the intersections between race and gender discrimination in sports", with particular focus on sport governing bodies.
Mxakato-Diseko said her push to involve the high commissioner and to introduce this issue into the UN system was to ensure that sports organisations cannot "selectively choose which human rights they are going to follow".
She called the IAAF's conduct "atrocious" and said Semenya was being targeted on "a gender basis and a race basis".
South Africa has previously accused the IAAF of seeking to violate women's bodies.
Some scientific experts have argued that barring Semenya from competition due to naturally high testosterone levels would be like excluding basketball players because they are too tall.
Mxakato-Diseko compared it to excluding a child from class because it has a high IQ.
The goal of the resolution, the ambassador said, is to assert "the right of Caster Semenya to earn a living and pursue a career of her choice as a woman".