Caster Semenya has won the Olympic 800m title twice and the world title three times
Caster Semenya has lost a landmark case against athletics' governing body meaning it will be allowed to restrict testosterone levels in female runners.
The Court of Arbitration for Sport (Cas) rejected the South African's challenge against the IAAF's new rules.
But Cas said it had "serious concerns as to the future practical application" of the regulations.
Olympic 800m champion Semenya, 28, said in response to the ruling that the IAAF "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 Cas will not hold me back," the statement continued.
"I will once again rise above and continue to inspire young women and athletes in South Africa and around the world."
Previously, she had said that she wanted to "run naturally, the way I was born".
Now she - and other athletes with differences of sexual development (DSD) - must either take medication in order to compete in track events from 400m to the mile, or change to another distance.
Cas found that the rules for athletes with DSD were discriminatory - but that the discrimination was "necessary, reasonable and proportionate" to protect "the integrity of female athletics".
However, Cas set out serious concerns about the application of the rules, including:
Worries that athletes might unintentionally break the strict testosterone levels set by the IAAF;Questions about the advantage higher testosterone gives athletes over 1500m and the mile;The practicalities for athletes of complying with the new rules.Cas has asked the IAAF to consider delaying the application of the rules to the 1500m and one mile events until more evidence is available.
Semenya is still eligible to compete at the Diamond League meet in Doha on Friday and can make an appeal against the Cas ruling to the Swiss Tribunal Courts within the next 30 days.
Caster Semenya posted this image on Twitter following the Cas decisionWhat are disorders/differences of sex development (DSD)?
People with a DSD do not develop along typical gender lines.
Their hormones, genes, reproductive organs may be a mix of male and female characteristics, which can lead to higher levels of testosterone - a hormone that increases muscle mass, strength and haemoglobin, which affects endurance.
The term "disorders" is controversial with some of those affected preferring the term "intersex" and referring to "differences in sex development".
The new rules come into effect on 8 May, which means athletes who want to compete at September's World Championships - also in Doha - will have to start taking medication within one week.
Those affected by the rules will have to have a blood test on 8 May to test their eligibility. A statement from the IAAF said that no athlete "will be forced to undergo any assessment" and that any treatment was up to the individual athlete.
Athletes with differences of sexual development (DSD) have higher levels of natural testosterone, which the IAAF believes gives them a competitive advantage - findings that were disputed by Semenya and her legal team.
Her lawyers had previously said her "genetic gift" should be celebrated, adding: "Women with differences in sexual development have genetic variations that are no different than other genetic variations in sport."
They have also suggested that Semenya "does not wish to undergo medical intervention to change who she is and how she was born".
What are the proposed changes?
The rules, applying to women in track events from 400m up to the mile, require athletes to keep their testosterone levels below a prescribed amount "for at least six months prior to competing".
However, 100m, 200m and 100m hurdles are exempt, as are races longer than one mile and field events.
Female athletes affected must take medication for six months before they can compete, and then maintain a lower testosterone level.
The rules were intended to be brought in on 1 November 2018, but the legal challenge from Semenya and Athletics South Africa caused that to be delayed until 26 March.
The United Nations Human Rights Council has called the plans "unnecessary, harmful and humiliating" and South Africa's sports minister called them a "human rights violation".
What next for Semenya?
On Friday, Semenya won 5,000m gold at the South African Athletics Championships - a new distance for her, and one outside the scope of the IAAF rule change.
It was only the second time Semenya had run the distance and she finished more than 100m ahead of defending national champion Dominque Scott.
However, Scott said she was unsure whether Semenya could be a serious Olympic contender over the longer distance.
Semenya is national and Commonwealth champion at 1500m, and also broke the African 400m record in August.
Semenya wins 800m gold as Sharp comes eighth'Wrong in principle' - reaction to verdict
Eighteen-time Grand Slam champion Martina Navratilova "The verdict against Semenya is dreadfully unfair to her and wrong in principle. She has done nothing wrong and it is awful that she will now have to take drugs to be able to compete. General rules should not be made from exceptional cases."
Marathon world record holder Paula Radcliffe: "I understand how hard a decision this was for Cas and respect them for ruling that women's sport needs rules to protect it."
Megha Mohan, BBC Gender and Identity reporter: "The spectrum of identity stretches far beyond the binary, say human rights activists, so shouldn't Semenya's physical abilities be celebrated the same way as Usain Bolt's height and Michael Phelps's wingspan are? Either way this verdict does not signal the end of the debate."
Timeline
31 July 2009: 18-year-old Semenya runs fastest 800m time of the year to win gold at the Africa Junior Championships.August 2009: Semenya undertakes a gender test before the World Championships in Berlin. She is unaware of the purpose of the test, with Athletics South Africa president Leonard Chuene telling her it is a random doping test.19 August 2009: Semenya wins 800m world gold, breaking the world-leading mark she set in July. After her victory, the news of Semenya's gender test is leaked to the press.November 2009: There are reports that Semenya's test has revealed male and female characteristics. The results are not made public.6 July 2010: Semenya is cleared by the IAAF to compete again.22 August 2010: Semenya wins the 800m at an IAAF event in Berlin.11 August 2012: Semenya wins 800m silver at the 2012 London Olympics. This is later upgraded to gold after Russian winner Mariya Savinov is given a lifetime ban for doping violations. Semenya is also upgraded to 2011 world gold.July 2014: India sprinter Dutee Chand, 18, is banned from competing after a hormone test shows natural natural levels of testosterone normally only found in men.23 March 2015: Chand begins a legal challenge against the IAAF's so-called gender tests.27 July 2015: Chand is cleared to compete; the Court of Arbitration for Sport suspends, for two years, the introduction of an earlier version of IAAF rules requiring female athletes to take testosterone-suppressing medication.20 August 2016: Semenya wins 800m gold at the Rio Olympics, but the decision to allow her to compete is questioned by other athletes.4 July 2017: Research commissioned by the IAAF finds female athletes with high testosterone levels have a "competitive advantage".26 April 2018: The IAAF introduces new rules for female runners with naturally high testosterone.19 June 2018: Semenya says she will challenge the "unfair" IAAF rules.18 February 2019: Semenya's legal hearing begins at Cas.1 May 2019: Semenya loses her challenge.