South African runner Caster Semenya on Wednesday lost her court challenge against IAAF rules forcing female athletes to regulate their testosterone levels, but judges voiced concern with the application of the "discriminatory" regulations.
Semenya, a double Olympic champion, was fighting measures imposed by the International Association of Athletics Federations (IAAF) that compel "hyperandrogenic" athletes - or those with "differences of sexual development" (DSD) - to lower their testosterone levels if they wish to compete as women.
A three judge panel at the Court of Arbitration for Sportsaid it had "some serious concerns as to the future practical application of these DSD regulations."
Even though the regulations are "discriminatory ... such discrimination is a necessary, reasonable and proportionate means of achieving the IAAF's aim of preserving the integrity of female athletics in the Restricted Events," the Lausanne-based court said in a statement.
The IAAF insisted the rules were essential to preserve a level playing field and ensure that all female athletes can see "a path to success".
The verdict is certain to cause controversy, as Semenya was backed by a global coalition of nations and scientific experts who argued that testosterone is an arbitrary and unfair measure for determining gender.
Experts also stressed that achieving excellence in sport is a combination of training and commitment as well as genetics and that barring people from competition over a single genetic factor has no scientific basis.
In a rare intrusion into the world of sport, the United Nations Human Rights Council adopted a resolution last month branding the IAAF rules "unnecessary, humiliating and harmful".
The IAAF has countered that DSD athletes with male levels of testosterone "get the same increases in bone and muscle size and strength and increases in haemoglobin that a male gets when they go through puberty."
Semenya's testosterone levels are not publicly known, but she is unlikely to be the only athlete affected by Wednesday's verdict.
The two athletes who finished behind her in the Rio Olympics 800m, Francine Niyonsaba of Burundi and Kenya's Margaret Wambui, have also faced questions about their testosterone levels.