Jax Mariash Mustafa always knew her genetic history would catch up with her.

The Telluride-based runner was born with congenital hallux valgus, a rare foot condition that caused her to have distinct bunion outgrowth on both of her feet. As a young girl, though, she was determined to not let the condition keep her from fulfilling her goals. And after winning the eight-and-under division of a 5K event hosted by her school in Denver at the age of five, she knew exactly what her dream was. “I wanted to be a runner,” she says. “That was going to be my thing in my life.”

Nearly four decades later, Mustafa has stood on the podium among elite runners at nearly every distance, from 5Ks to multi-day, self-supported ultramarathon competitions known as stage races. She earned the nickname “Queen of the Desert” for her first-place finishes in races through punishing desert landscapes. But this month, Mustafa won’t endure a 50-mile day across a desert or log a 25-mile training run. Instead, with two bunion-related foot surgeries ahead of her, she’s facing a whole new kind of challenge: retiring from professional running. “It’s an identity crisis,” she says. “At 42, you have to ask yourself, At what point do I need to say I finished on top, be OK with that, and find other goals?

Mustafa’s running career began after that first 5K. She started training with her mom and the kindergarten physical education teacher, even “doing little weight workouts,” she says. Before the end of the running season, she was ready for 10K races; she won the 10-and-under age group at the Bolder Boulder that same year. After a decorated high school track and field stint, she took up triathlon and duathlon at the elite level in 1998, earning national champion and All-American titles in triathlon in 2008 and taking second at the Long Course Duathlon World Championships that same year. Despite her success in the multidisciplinary sports, she says she just missed the simplicity of running.

So, she returned to her bipedal pursuits, starting with competitive half-marathons, before working her way up to 50K ultramarathons and eventually tackling multi-day, self-supported stage races. In 2016, when she heard that no woman had completed the Four Deserts Grand Slam Plus, she laced up her running shoes and started training, logging 80 to 100 miles each week.

Completing the Four Deserts Grand Slam Plus requires an athlete to finish four, 155-mile stage races across deserts in Chile, Mongolia, Namibia, and Antarctica, as well as the 155-mile RacingThePlanet self-supported race. Runners must complete all five races within a single calendar year without any assistance. “In these races you have to carry everything that you need to survive for the whole seven days,” Mustafa says, listing off essentials like food and extra layers of clothing. “The race officials give you water and basically a canvas tent to sleep under with 10 other people–and medical aid in extreme cases.” In Mustafa’s case, she also needed Band-Aids and metatarsal pads to manage her bunion pain.

To say completing one of these races is tough is a gross understatement. Mustafa’s March 2016 experience in the Gobi Desert in Mongolia included a day so hot her shoes melted. When she ran out of water, she tipped back her empty bottle and pretended to drink. “I was kind of, a little bit, going crazy at that point,” she says. Mustafa took sixth overall and beat the second-place female athlete by 12 hours.

That same year, she became the first woman to finish the Four Deserts Grand Slam Plus, winning first place for females in the four desert races and claiming second place in the roving RacingThePlanet ultramarathon in Sri Lanka. “Each of these races, they take you to your limit,” Mustafa says. “You have ultimate highs, but you have points where you’re kind of killing yourself—and you could die.”

Through it all, Mustafa’s feet have remained an ever-present source of pain. Bunions might start small, but they lead to a condition in which the body’s weight lands on the protruding bump, rather than the big toe. That impact would have led to problems even if Mustafa wasn’t a runner; the issue was certainly amplified given her career choice.

Over the years, Mustafa used a lengthy list of temporary solutions to combat the pain: cortisone shots, metatarsal pads, and when necessary, surgeries to try to correct her disfigured feet (including a procedure to repair a torn plantar plate). But she kept running. In fact, there were only a few months—when doctor’s orders required she stay off her healing feet—in which she didn’t log double-digit mileage.

Last August, at the Ultra-Trail du Mont Blanc—a race that gains nearly 33,000 feet of elevation over the course of 106 miles, making it one of the premier sufferfests in all of running—Mustafa’s feet finally forced her hand. At mile 19.7, excruciating pain caused her to walk off the course; she knew it was the end of her professional racing career. “​​When your body tells you, ‘Enough,’ you have this eye-opening experience with yourself like, ‘Oh, shit, how do I identify myself?’ ” she says. “But you kind of have to let dreams go, too.”

Maybe it’s not letting go so much as recognizing—and reconciling—that dreams change. In the 10 months since her last race, Mustafa had what she calls her “dream wedding.” She also joined an outdoor brand, Erem Footwear, that’s carving a niche for itself as a premium desert hiking bootmaker. “To align my job with my passion for the desert is the dream job,” she says.

Now, as she prepares for surgery, this time for a calf-lengthening procedure, the self-described victim of her feet tackled an eight-mile run—one for each of the six surgeries she’s had so far, plus the two coming up—for Global Running Day on June 1. Each mile hurt. Each step hurt. On the other side, though, both surgeries will bring the Queen of the Desert closer to pain-free running again. “I want to go run in the mountains all day with my husband,” she says. “That’s my new dream.”

(Read more: The Beginner’s Guide to Trail Running in Colorado