The Court of Arbitration for Sport, the highest court in international sports, ruled on Wednesday that women with naturally elevated testosterone levels must take drugs to suppress that if they want to compete in certain running distances at the international level.

The ruling marks a defeat for two-time Olympic champion Caster Semenya, who had taken the International Association of Athletics Federations to court over its rules limiting naturally occurring testosterone in female athletes. Semenya, a South African athlete who has won two Olympic gold medals in the 800m, has what the IAAF and CAS call “differences of sexual development,” which means her body produces more testosterone than most women.

The three-person panel ruled 2-1 in the IAAF’s favor, saying that while the testosterone regulations are discriminatory, they’re necessary to preserve the “integrity” of certain female running events. From the CAS news release on the ruling:

The Panel found that the DSD Regulations are discriminatory but the majority of the Panel found 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.

Semenya, who has been subject to dehumanizing gender testing throughout her career, released this statement through her lawyers (via the New York Times):

“I know that the IAAF’s regulations 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 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.”

It’s worthy to note that neither the regulations or the ruling are about trans women. It doesn’t address athletes with gender dysphoria who take hormones. Caster Semenya is not trans — she was born a woman, and has lived as a woman her whole life. Her body naturally produces more testosterone than is considered normal in women. The IAAF and CAS have now decided that to compete at certain distances, she must take hormones to suppress what her body naturally produces.

Despite the ruling determining that “discrimination is necessary,” CAS didn’t stand entirely behind it. It has “serious concerns as to the future practical application” of the testosterone regulations, and indicated that the issue is far from settled. In addition to concerns that the regulations would be applied fairly, the ruling singled out three areas of concern:

There could be issues with implementing the regulations, and athletes may have difficulty complying with them as they are currently set by the IAAF. There is little or no concrete evidence that elevated testosterone gives female athletes an advantage in 1500m and mile distances, which are currently included in the IAAF’s regulations. Side effects of hormonal suppression could be severe, and could make it impossible for athletes to comply with the regulations.

The IAAF’s regulations will go into effect in seven days. But in light of those concerns, a spokesperson for Semenya urged the IAAF to postpone putting those regulations into effect right away.

More from Yahoo Sports: