Double Olympic 800m champion Caster Semenya has lost her appeal to the Swiss Federal Tribunal to set aside a 2019 Court of Arbitration (CAS) ruling that female athletes with high natural testosterone levels must take medication to reduce it.
The ruling means Semenya cannot defend her Olympic title in 2021, or compete at any top meets in distances from 400m to the mile, unless she agrees to lower her testosterone level through medication or surgery.
She has repeatedly said she won't do that.
But the South African has indicated that she may continue her battle in the European and domestic courts before the Olympics in Tokyo next year, vowing to "fight for human rights".
The tribunal found that subjecting female athletes to drug or surgical interventions as a precondition to compete does not amount to a violation of Swiss public policy.
Testosterone increases muscle mass, strength and haemoglobin, which affects endurance.
Some competitors have said women with higher levels of the hormone have an unfair advantage.
"I am very disappointed by this ruling, but refuse to let World Athletics drug me or stop me from being who I am," Semenya said in the statement on Tuesday.
"Excluding female athletes or endangering our health solely because of our natural abilities puts World Athletics on the wrong side of history."
World Athletics welcomed the ruling, which they said vindicates their stance in creating a level playing field for all athletes.
"We are very pleased that the highest court in Switzerland has now joined with the highest court in sport in endorsing World Athletics' arguments" the governing body said in a statement.
But Semenya's lawyer, Greg Nott, suggested this was far from the end of the road for his client.
"This setback will not be the end of Caster's story," he said.
"The international team (of lawyers) is considering the judgement and the options to challenge the findings in European and domestic courts."