South African Olympic champion Caster Semenya has lost an important case against athletics' governing body.
The middle distance runner had challenged a new rule by the International Association of Athletics Federations (IAAF) that restricts testosterone levels in female runners, but the result means the IAAF will be allowed to restrict testosterone levels in female runners.
The Court of Arbitration for Sport (CAS) rejected Semenya's challenge against the IAAF's new rules, saying it had "serious concerns as to the future practical application" of the new rules.
They said the decision was "necessary, reasonable and proportionate" to make sure competition was fair for females.
Semenya, 28, said the regulations were "unfair" and that she wanted to "run naturally, the way I was born".
She will now have to take medication to reduce her testosterone if she wants to keep running on the international stage.
Testosterone is a chemical in the body called a hormone, which can affect how we behave and how our bodies grow and develop.
It is typically found in high levels in men. Women also produce this hormone but usually in smaller amounts.
Testosterone is responsible for things like the deeper voices in men, and body and facial hair, as well as how big and strong muscles grow and develop.
When Semenya was 18, she was asked by the IAAF to take a gender test. The results were not released but some media reported that her test had shown male and female characteristics, including higher than normal levels of testosterone.
Throughout the period of waiting for the gender test results, Semenya was banned from competing, but was cleared to return in July 2010.
The IAAF's rule means that women like Caster with higher than normal levels of testosterone would have to compete against men or lower the levels of the hormone in their bodies.
It applies to women who race in track events from 400m up to the mile.
Athletes who want to compete in these events must take medication for six months to lower the levels of testosterone that they have in their bodies, and then maintain that level.
The rules were supposed to be brought in on 1 November 2018, but were delayed after Semenya and her country's athletics organisation - the ASA - challenged the rule.
South Africa's sports minister said that Caster had been "targeted" and called the proposed IAAF rule a human rights violation.
Speaking in 2018, Semenya called the ruling "unfair", adding: "I just want to run naturally, the way I was born."
Many people think that Caster has an unfair advantage because of her hormone levels, which they say means that she can perform at a higher level.
In 2016 after Semenya won a gold medal at the Rio Olympics in Brazil, British athlete Lynsey Sharp started crying after she completed the 800m final in 6th place.
In an interview with the Daily Telegraph, Sharp said "everyone can see" the difference between athletes that have higher testosterone levels and those without.
"Everyone can see it's two separate races, so there's nothing I can do," she said.
Research paid for by the IAAF in July 2017 found that female athletes with high testosterone levels had a "competitive advantage".
However, critics of the governing body think that the IAAF is treating Caster unfairly.
The IAAF said that the rules are "in no way intended as any kind of judgement on or questioning of the sex or the gender identity of any athlete".