An international sports court has ruled against a South Africa Olympian who hoped to stop sports authorities from requiring women with high testosterone to take suppressants, in order to qualify to compete.

The Court of Arbitration for Sport ruled against South African 800 meter Olympic champion Caster Semenya who said that forcing women to undergo such treatments was “discriminatory.”

The court ruled in favor of the International Association of Athletics Federations (IAAF), the international authority for track and field, that claims the suppressants are needed to level the playing field in female sports.

According to the Hill, “The judges ruled 2-1 that the IAAF policies are discriminatory but can be applied ‘on the basis of the evidence submitted by the parties, [if] 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.'”

Semenya, who twice won the 800-meter race, has been barred from competition until she takes a test to prove she is actually a woman after many began to question her gender.

The runner has refused to take any such tests claiming that the requirement is a violation of her human rights and an act of discrimination.

“I just want to run naturally, the way I was born,” Semenya said, according to the New York Times. “It is not fair that I am told I must change. It is not fair that people question who I am.”

The IAAF set rules about testosterone levels in light of a growing number of competitors born male but now claiming to be transgender women who have flooded the world of sports.

“Most women, including elite female athletes, have natural testosterone levels of 0.12 to 1.79 nanomoles per liter, the IAAF argued in court. The typical male range after puberty is significantly higher — 7.7 to 29.4 nanomoles per liter,” the Hill noted.

The International Olympic Committee had already dropped requirements that transgender women must be undergoing a surgical transformation from male to female before being allowed to compete as women. But the new ruling could clear the way for the IOC to put more stringent rules in place.

Follow Warner Todd Huston on Twitter @warnerthuston.