The Court of Arbitration for Sport on Wednesday dismissed an appeal by Olympic 800-meter champion Caster Semenya against the introduction of regulations to restrict testosterone levels in female athletes.
The Lausanne-based court ruled the regulations were needed for athletes with differences in sexual development, or DSDs, to ensure fair competition. The rules cover events ranging from 400 meters to a mile.
The case is likely to have wide-reaching consequences, not just for the future of athletics, but all women's sport, and has split opinion around the globe.
But while dismissing the appeal, the CAS also voiced concerns about the application of the new International Association of Athletics Federations regulations.
The rules mean Semenya and other athletes with DSD hoping to compete at the world championships in Doha, Qatar, in September would have to start taking medication to lower their testosterone levels within one week.
Semenya has said she does not wish to undergo medical intervention to change who she is and how she was born, and wants to compete naturally.
But her dominance of the middle distances has been labelled unfair by some of her competitors.
"Sometimes it is better to react with no reaction," Semenya tweeted after the verdict.
The IAAF welcomed the verdict.
"The IAAF ... is pleased that the regulations were found to be a necessary, reasonable and proportionate means of achieving the IAAF's legitimate aim of preserving the integrity of female athletics in the restricted events," the global governing body said in a statement.
"No athlete will be forced to undergo any assessment and/or treatment under these regulations. It is each athlete's responsibility, in close consultation with her medical team, to decide whether or not to proceed with any assessment and/or treatment," it said.
However, in the 165-page ruling, the three-man CAS judges' panel expressed some concerns as to the future practical application of these regulations.
"The Panel found that the DSD regulations are discriminatory, but the majority of the Panel found that, on the basis of the evidence submitted by the parties, 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 statement said.
Under the rules, female athletes who have high natural levels of testosterone will have to reduce their levels through medication to under 5 nmol/L, which is double the normal female range of 2 nmol/L.
Testosterone is a hormone that increases muscle mass, strength and haemoglobin — which affects endurance.
The IAAF believes the regulations are necessary to "preserve fair competition in the female category", and has received support from some current and former athletes.
But the governing body has also come in for criticism from human rights organizations over its wish to medically alter naturally produced levels of testosterone, with the United Nations Human Rights Council adopting a resolution in support of Semenya in March.
The 28-year-old South African will be the most high-profile athlete to be affected by the rules, but others include 2016 Olympic silver medalist in the 800 meters, Francine Niyonsaba of Burundi.
Semenya took potential steps to reinvent her career last week when she won the 5,000 at the South African Athletics Championships in a modest time of 16:05.97, an event that would allow her to compete outside of the IAAF regulations.
Following the CAS case, other sporting bodies may now choose to set their own parameters for participation by DSD and transgender athletes in their individual codes.
A further appeal is possible to Switzerland's supreme court in Lausanne. Federal judges rarely overturn CAS decisions but can intervene if legal process was abused.
Wednesday's verdict followed a five-day hearing in February that was among the longest in the court's 35-year history. Semenya spent the week in Lausanne attending sessions and IAAF president Sebastian Coe was at court on the opening day.