South Africa's Caster Semenya lost her appeal Wednesday against rules designed to decrease naturally high testosterone levels in some female runners.

In a landmark 2-1 ruling, the highest court in world sports said the proposed rules from track's governing body, the International Association of Athletics Federations, are discriminatory, but "such discrimination is a necessary, reasonable and proportionate means" of "preserving the integrity of female athletics."

The IAAF argued that unusually high, naturally occurring levels of testosterone in athletes like Semenya with "intersex" conditions that don't conform to standard definitions of male and female give them an unfair competitive advantage, and it decreed a maximum for females.

The 28-year-old South African runner whose sculpted biceps and super-fast times have led others to question her accomplishments declared she will not be stopped by the ruling, issued by the Court of Arbitration for Sport in Switzerland.

"I know that the IAAF's regulations have always targeted me specifically," Semenya said in a statement. "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."

WATCH | Caster Semenya's lawyer on appeal loss:

Two-time Olympic champion Caster Semenya lost her appeal against rules designed to decrease naturally high testosterone levels in some female runners. 7:21

The two-time Olympic champion in the 800 metres will have to lower her testosterone levels if she wants to defend her world title in September in Doha, Qatar.

Semenya was travelling to Doha on Wednesday for the first Diamond League track meet of the season, where she is expected to run the 800 on Friday at 1:07 p.m., a race that will be lived streamed at CBCSports.ca. The Diamond League is an annual series of meets for the top athletes in the world, and the event is the last one before the new rules apply.

'Rules will be a source of distress'

Testosterone is a hormone that strengthens muscle tone and bone mass. Because of that, it is against the rules for athletes to inject or swallow testosterone supplements. Some women have what is known as hyperandrogenism, meaning they have naturally occurring levels that are unusually high.

The IAAF rules require women to lower their levels below 5 nanomoles per litre of blood. According to the IAAF, most females, including elite athletes, have levels of testosterone circulating naturally in their bodies of 0.12 to 1.79 nanomoles per litre, while men have levels that can be dozens or even hundreds of times higher — typically 7.7 to 29.4.

Semenya's level is considered private medical information and has not been disclosed.

The South African Sports Confederation and Olympic Committee decried the ruling, saying, "We maintain that the rules are ill-thought and will be a source of distress for the targeted female athletes."

"This decision marks a massive turning point as it now redefines what a female athlete in particular is," said Natalie du Toit, head of the organization's athletes commission, adding: "Knowing Caster and the hard work she has put into her sport, we support all her endeavours, and we are all behind her."

WATCH | Kristen Worley on Caster Semenya vs. IAAF

Caster Semenya's hands are tied when it comes to appealing to the Court of Arbitration for Sport. Kristen Worley comments based on her own journey detailed in her book Woman Enough. 4:09

Kirsty Duncan, Canada's sport and science minister, was critical of the decision.

"I'm very disappointed in the ruling," said Duncan said Wednesday. "I think it shows a total disregard for human dignity.

"I do not think a sport organization should be deciding who is a woman or what makes a woman. I don't think any sport organization should be telling an athlete to alter their body chemistry.

"We ask that our athletes do not take drugs. Now an athlete is being told her alter her natural body chemistry."

'Unfair advantage'

The IAAF went into the case arguing that female runners with high testosterone have an unfair advantage in events from 400 metres to the mile. However, the court suggested that the IAAF apply the rules only up to the 800 because the evidence was not clear that women with hyperandrogenism have an edge in the 1,500 metres.

That could give Semenya a route to compete at the world championships without taking medication, such as birth control pills.

A further appeal is possible to Switzerland's Supreme Court in Lausanne. But judges rarely overturn decisions of the world sports court.

Ross Tucker, a sports science consultant who testified on Semenya's behalf and boasts of a Ph.D. in exercise physiology, said the scientific evidence is insufficient to justify the rules. He said that as a result of the court decision, other sports will essentially copy the IAAF's regulations.

"For them, every fear and concern they had that they will be in the spotlight for introducing similar rules will be gone," he said. "Other sports will be super happy because the pressure's off to develop their own regulations."

He said the ruling moves the world of sports closer to developing its own definition of gender, based on hormone levels.

"'Sporting sex' has been introduced," he said. "That is where the decision does have far-reaching effects."

John Brewer, a professor of applied sports science at the Buckinghamshire New University in Britain who supports the IAFF rule, said such regulations could end up being adopted not just by individual sports but by team sports such as rugby, soccer and field hockey.

Fresh scientific study

Semenya was legally recognized at birth as female, but her speed and muscular body have led others to cast doubt on the integrity of her track achievements throughout her career. As a teenager in 2009, she won her first world title in Berlin. Hours before the race, the IAAF had asked for Semenya to undergo a gender verification test.

Semenya's case was the second effort by the IAAF to regulate such athletes. In 2015, a panel including two of the same judges who heard Semenya's case blocked the IAAF's first attempt in an appeal brought by Indian sprinter Dutee Chand.

The judges four years ago said the IAAF did not prove hyperandrogenic women gained a significant advantage, and invited the governing body to submit new evidence. The IAAF produced a fresh scientific study.

Semenya is not the only female athlete with high natural levels of testosterone but has become an unwilling face of the issue. Two weeks ago, Olympic silver medallist Francine Niyonsaba of Burundi confirmed she has the same hyperandrogenism as her rival in the 800.

WATCH | Why testosterone is not always a competitive advantage:

Explaining science behind testosterone, and why a dose doesn't always equal an advantage. 1:55

Referring to the rule, Niyonsaba said: "For me, it's about discrimination. It doesn't make sense. I didn't choose to be born like this. What am I? I'm created by God."

At the 2016 Rio Olympics, Semenya and Chand were publicly identified as women with high testosterone, but other athletes implied that other runners, including medallists in the 800 metres, also had elevated levels.

"I think that we need separate events for them and for us," said Nataliia Lupu of Ukraine said after running against Semenya. "You can see that it's easy for them." Semenya will "definitely win against us, even without using her full strength."