Caster Semenya has lost her legal battle with athletics' world governing body the IAAF over its regulations restricting testosterone levels in women runners in selected events, the Court of Arbitration for Sport has announced.
The two-time Olympic 800 metres champion and Athletics South Africa had claimed the rules, which would force athletes with naturally-occurring high levels of testosterone to take medication to lower them, were unlawful.
The 28-year-old has one of the various genetic conditions collectively known as differences or disorders of sex development (DSD).
But CAS said in a statement on Wednesday: "By majority, the CAS panel has dismissed the requests for arbitration considering that the claimants were unable to establish that the DSD regulations were 'invalid'.
"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."
Semenya responded on social media with a tweet which read: "Sometimes it's better to react with no reaction."
Semenya has been the subject of intense scrutiny ever since she burst onto the scene at the 2009 World Championships in Berlin, where she won the first of her three world titles.
Aged just 18, she achieved that feat despite the emotional strain caused by international media speculation about a gender verification test following complaints from rivals about her muscular build.
The IAAF's proposed regulations concern athletes competing in events from the 400m to the mile.
However, despite the award in favour of the IAAF, CAS said its panel "expressed some serious concerns as to the future practical application" of the DSD regulations.
CAS said that while the "evidence available so far has not established that those concerns negate the conclusion of prima facie proportionality, this may change in the future unless constant attention is paid to the fairness of how the regulations are implemented".
It highlighted the following three key issues.
The panel "expressed its concern as to an athlete's potential inability to remain in compliance with the DSD regulations in periods of full compliance with treatment protocols, and, more specifically, the resulting consequences of unintentional non-compliance".
It also suggested the IAAF "consider deferring the application of the DSD regulations" to the 1500m and mile because of the current lack of "concrete evidence of actual (in contrast to theoretical) significant athletic advantage" in these events.
And it added "the side effects of hormonal treatment, experienced by individual athletes could, with further evidence, demonstrate the practical impossibility of compliance which could, in turn, lead to
a different conclusion as to the proportionality of the DSD regulations."
The IAAF said it was "grateful" to CAS for its judgement and was "pleased" its regulations had been upheld.
It said the regulations would be coming into effect on May 8.
As a result, affected athletes hoping to be eligible for the World Championships in Doha in October, have a week to reduce testosterone levels to within the regulation levels, so, the IAAF said, they "are encouraged to initiate their suppressive treatment as soon as possible".
The regulations require athletes to reduce their testosterone levels to below 5 nmol/L for a continuous period of at least six months prior to competition.
But the IAAF said that, because of the delay in implementing the rules caused by Semenya's legal challenge, it will accept affected athletes who comply with the limit starting on or before May 8 as eligible.
The governing body added: "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."