This could be it for Caster Semenya and the Olympics.

Forced out of her favorite race by World Athletics' testosterone rules, the two-time Olympic champion in the 800 meters took a late shot at qualifying for Tokyo in the 5,000 meters, an event not affected by the hormone regulations. She came up short.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Now 30, Semenya's hopes of making it back to the Olympics are dwindling.

The South African once said she wanted to run at top track events until she was 40. Now, her future ambitions depend on a final, long-shot legal appeal of the testosterone rules or transforming from the world's dominant middle-distance runner into a successful long-distance athlete. That's going to be hard for her.

Semenya is the athlete that has perhaps stoked the most controversy in track and field over the last decade. If there are no more appearances on the biggest stage, it's been a career like no other. In 12 years at the top, Semenya has won two Olympic golds and three world championship titles, but her success has come amid near-constant interference by track authorities. She has only competed free of restrictions of one type or another for three of those 12 years.

WHY CAN'T SEMENYA DEFEND HER 800 TITLE IN TOKYO?

In 2018, world track and field's governing body introduced rules it said were aimed at female athletes with conditions called differences of sex development, or DSDs. The key for World Athletics is that these athletes have testosterone levels that are higher than the typical female range. The track body argues that gives them an unfair advantage. Semenya is the highest-profile athlete affected by the regulations, but not the only one.

The rules demand that Semenya lower her testosterone levels artificially — by either taking birth control pills daily, having hormone-blocking injections or undergoing surgery — to be allowed to run in races from 400 meters to one mile. Semenya has simply refused to do that, pointing out the irony that in a sport where doping is such a scourge, authorities want her to take drugs to be eligible to run at the Olympics.

"Why will I take drugs?" Semenya said in 2019. "I’m a pure athlete. I don’t cheat. They should focus on doping, not us."

CLICK HERE TO GET THE FOX NEWS APP

BUT SHE CAN RUN THE 5,000?

Yes. Strangely, World Athletics decided to only enforce the testosterone rules for track events from 400 meters to one mile, raising criticism from Semenya's camp that the regulations were specifically designed to target her because of her dominance.

It means Semenya can compete in the 100 and 200 meters and long-distance races without lowering her testosterone levels. Field events are also unregulated. After a brief go at 200 meters, Semenya attempted to qualify for Tokyo in the 5,000 meters, running races in Pretoria and Durban in South Africa and, most recently, at international meets in Germany and Belgium last month. She never came within 20 seconds of the Olympic qualifying mark.

THE COURT BATTLE

Semenya continues to fight against the testosterone regulations in court. She has launched three legal appeals against the rules, calling them unfair and discriminatory, and appears determined to wage her legal fight to the very end. Having failed in appeals at the Court of Arbitration for Sport and the Swiss supreme court, Semenya has now lodged an appeal with the European Court of Human Rights.

Semenya's first appeal at sport's highest court revealed a bitter battle between her and track authorities, centered on World Athletics' claim in the closed-doors hearing that she was "biologically male." Semenya angrily refuted that, having been identified as female at birth and having identified as female her whole life. She called the assertion "deeply hurtful."

OTHER ATHLETES AFFECTED

The issue won't disappear with Semenya. Just this week, two 18-year-old female athletes from Namibia were barred from competing in the 400 meters at the Tokyo Olympics after they underwent medical tests and it was discovered they had high natural testosterone levels. One of them, Christine Mboma, is the world under-20 record holder.

The two runners that finished second and third behind Semenya at the 2016 Olympics, Francine Niyonsaba of Burundi and Margaret Wambui of Kenya, have said publicly they also are affected by the testosterone regulations and have been banned from the 800, too, unless they undergo medical intervention. Niyonsaba has qualified for the Olympics in the 5,000 meters.

WHAT NOW?

Semenya has been clear that the rules won't force her out of track and she'll keep running and keep enjoying the sport, even if she can't go to the biggest events.

"Now is all about having fun," she said at a meet in South Africa in April. "We’ve achieved everything that we wanted‚ all the major titles‚ inspiring the youth."

"For me, it’s not about being at the Olympics," she said. "It’s being healthy and running good times and being in the field for the longest."