Lausanne: Caster Semenya has lost her case against athletics' governing body the IAAF in the Court of Arbitration for Sport (CAS).
The decision announced by CAS on Wednesday means that the double Olympic champion will be forced to reduce her natural levels of testosterone to compete in distances from 400m to the mile.
The panel of three CAS judges ruled 2-1 that the International Association of Athletics Federations (IAAF) regulations are necessary to ensure fair competition.
Last April, the IAAF issued Eligibility Regulations for Female Classification requiring female athletes with testes or naturally high concentrations of testosterone to reduce their levels sufficiently to be able to compete at distances between 400 metres and a mile.
In this landmark judgment, CAS says the IAAF's proposed rules on athletes with "differences of sex development (DSD) are discriminatory but "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 ruling would force Semenya to start taking medication to lower her testosterone level within one week if she wanted to defend her 800m title at the World Championships in Doha in September.
South Africa's superstar reacted with a tweet saying sometimes "it's better to react with no reaction".
In a statement released by her lawyers, the 28-year-old added: "I know that the IAAF's regulations have always targeted me specifically. For a decade the IAAF has tried to slow me down, but this has actually made me stronger. The decision of the CAS will not hold me back. I will once again rise above and continue to inspire young women and athletes in South Africa and around the world."
Semenya challenged the proposal, arguing it was unfair and discriminatory against women in sport.
She has always insisted she just wanted "to run naturally the way I was born".
Athletics South Africa said it will meet next week to discuss the verdict on the case.
South Africa's government ensured Semenya of "continued support as we navigate the future with her" and promised to lobby through other international organisations