Last updated on .From the section Athletics

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".

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.

"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," said Semenya in a statement.

"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".

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.

What 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.

What is the difference between transgender and intersex?

Dr Seema Patel, senior law lecturer at Nottingham Trent University.

We have heard a lot about transgender over the past year. Obviously that's a natural discussion that's going to take place, but Semenya is not transgender.

Intersex is a term used to refer to differences of sexual development in individuals. It can relate to men and women and can manifest itself externally, with varied external genitalia or characteristics, or internally in relation to chromosomes and testosterone.

It can have health repercussions on athletes. Individuals can live their life not knowing they have any DSD.

Transgender describes a person whose gender is not the same as, or does not sit comfortably with, the sex they were assigned at birth.

They may have reassignment to make that transition or they may wish to identify themselves as male or female without making any physiological transitions.

'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 and the question of transgender athletes remains unresolved."

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