The South African 800m star Caster Semenya has lost her landmark legal case against athletics’ governing body, the IAAF, in a decision that will send shockwaves through sport.

It means that the 800m Olympic champion will have to take medication to reduce her testosterone if she wants to run internationally at events between 400m and a mile. The surprise verdict, which was announced by the Court of Arbitration for Sport after three arbitators had spent more than two months deliberating over the complex and highly contentious case, came even though Cas agreed that the IAAF’s policy was “discriminatory” to athletes with differences in sexual development (DSDs) such as Semenya.

However, two of three arbitrators accepted the IAAF’s argument that high testosterone in female athletes confers significant advantages in size, strength and power from puberty onwards, and said the policy was “necessary, reasonable and proportionate” to ensure fair competition in women’s sport.

It means that all DSD athletes, who are usually born with testes, will have to reduce their testosterone to below five nmol/L for at least six months if they want to compete internationally at distances ranging from 400m to a mile. The IAAF, which welcomed the news, said their policy would come into place on May 8.

Semenya, who has long argued that her unique genetic gifts should be celebrated not regulated, confirmed that she was considering an appeal and insisted that she believed that the DSD regulations would be one day overturned.

“I know that the IAAF’s regulations have always targeted me specifically,” she added. “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.”

The sports scientist Ross Tucker, who was part of Semenya’s team of experts at Cas last month, believes it will mean the South African will run 800m around seven seconds slower – turning her from a world beater into an also-ran at that event. However she may now decide to step up to 5,000m where the IAAF’s rules on DSD athletes do not apply.

Explaining its verdict, Cas said that Semenya’s team had been unable to prove the IAAF’s policy was “invalid” during the five days tribunal in February. And, crucially, it ruled that discrimination in sport is legal provided it is justified.

As it explained in a statement: “The panel found that the DSD Regulations are discriminatory but 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.”

However, in its 165-page ruling, the Cas panel expressed “some serious concerns” as to whether the DSD regulations would be applied fairly. It also accepted there could be issues in three other areas including: difficulties for athletes in implementing and complying with the DSD regulations; the absence of concrete evidence supporting the inclusion of certain events under the DSD Regulations, including the 1500m and one mile; the potentially negative and harmful side effects of hormone treatment for DSD athletes.

On the health issues, Cas even 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.”

A spokesperson for Semenya urged the IAAF to take heed of Cas’s concerns and postpone its plan to introduce the DSD regulations, which will take effect in seven days’ time.

“Ms Semenya believes that the dissenting Cas arbitrator will be shown to be correct and the DSD Regulations will be overturned,” the spokesperson added.

“In the interim, Ms Semenya believes that it is irresponsible for the IAAF to proceed with the implementation of the DSD Regulations in circumstances where the Cas decision makes it abundantly clear that there are serious problems with the regulations that need to be carefully considered and the DSD Regulations will unquestionably cause harm to the women affected by them.”

Semenya had taken the IAAF to court over its plans requiring female DSD athletes to take hormone suppressants, arguing that the policy was discriminatory, unfair, and potentially posed a health risk.

However during the five-day hearing last month, the IAAF maintained that its policy was solely about creating a level playing field for all woman, so that success was based on talent and hard work. A key part of its case was that more than 99% of females have around 0.12-1.79 nmol/L of testosterone in their bodies – while DSDs like Semenya are in the male range of 7.7-29.4 nmol/L.