Caster Semenya will take to the track at the season's first Diamond League meeting in Doha on Friday night for her last race over 800 metres before new rules come into force for women with higher than normal male hormone levels.
Semenya, 28, had challenged the decision of the International Association of Athletics Federations (Iaaf) to impel such women to take medicines to lower the amount of testosterone in their bodies if they want to race over distances between 400m and the mile.
On Wednesday, the Court of Arbitration for Sport (Cas) upheld the Iaaf's move which will come into effect on 8 May.
Following the verdict of the Swiss-based court, Semenya hinted that she may quit. "Knowing when to walk away is wisdom," she said in a Tweet. "Being able to is courage. Walking away with your head held high is dignity."
In a later tweet, she added: "They laugh at me because I am different. I laugh at them because they're all the same."
Iaaf chief, Sebastian Coe, said the Cas decision helped to create a level playing field in the women's events. "I think this is pretty straightforward,and it's very straightforward for any international federation in sport," said the former Olympic champion.
"Athletics has two classifications: it has age, it has gender, we are fiercely protective about both and I am really grateful that the Court of Arbitration has upheld that principle."
If Semenya refuses to take the hormone medication to lower her testosterone levels, she could still compete in the 5,000m, a distance not covered by the Iaaf's rules.
Before the ruling on 1 May, Semenya won gold medals at the 2012 and 2016 Olympics in the 800m. She also claimed gold over the distance at the Iaaf world championships in 2009, 2011 and 2017.
The two athletes who finished in the silver and bronze medal positions behind Semenya at the 2016 Rio Olympics, Burundi's Francine Niyonsaba and Margaret Wambui of Kenya, will race against her in Doha on Friday.
Wambui, who has also faced questions over her testosterone levels but unlike Semenya has not been forced to undergo tests for hyperandrogenism, criticised the Iaaf decision.
"This life sometimes is so unfair", she wrote on Twitter: "Everything that happens, happens with a reason Caster."
Tokozile Xasa, the South African sports minister, said the country's authorities would continue to back Semenya.
"As the South African government we have always maintained that these regulations trample on the human rights and dignity of Caster Semenya and other women athletes.”