Lindsey Vonn has only two races remaining on her aching knees.

The women's all-time leader in World Cup wins announced Friday that she will retire from ski racing after this month's world championships in Sweden.

The 34-year-old Vonn had been planning to retire in December of this year but changed her plans because of persistent pain in both of her knees, which she fully realized after failing to finish a race in Cortina d'Ampezzo, Italy, last month.

"It's been an emotional 2 weeks making the hardest decision of my life, but I have accepted that I cannot continue ski racing," Vonn wrote on Instagram. "I will compete at the World Championships in Downhill and SG [super-G] next week in Are, Sweden and they will be the final races of my career."

The worlds open with the women's super-G on Tuesday. The women's downhill is scheduled for Feb. 10.

"You have consistently raised the bar, you have created a legacy that will live forever, and you have given us all some of the greatest memories in our sport," said Tiger Shaw, the president and CEO of U.S. Ski and Snowboard.

Vonn's right knee is permanently damaged from previous crashes. The American has also torn ACLs, suffered fractures near her left knee, broken her ankle, sliced her right thumb, had a concussion and more. She's limited now to about three runs per day, and her aching body can't handle the workload of other skiers.

"My body is broken beyond repair and it isn't letting me have the final season I dreamed of," Vonn wrote. "My body is screaming at me to STOP and it's time for me to listen."

Retiring in Sweden brings Vonn full circle.

She won the first two major championship medals of her career -- two silvers -- at the 2007 worlds in the Swedish resort of Are. Vonn has also won seven World Cup races in Are, including two giant slaloms, and has 12 podiums overall.

At last season's World Cup finals in Are, Vonn won the downhill and finished third in the super-G.

However, with 82 World Cup wins, Vonn will not be able to match the overall record of 86 held by Swedish great Ingemar Stenmark.

"Honestly, retiring isn't what upsets me. Retiring without reaching my goal is what will stay with me forever," Vonn wrote. "However, I can look back at 82 World Cup wins, 20 World Cup titles, 3 Olympic medals, 7 World Championship medals and say that I have accomplished something that no other woman in HISTORY has ever done, and that is something that I will be proud of FOREVER!"

In her announcement, Vonn also made public for the first time that she had yet another surgery on her right knee following last season.

"A large portion of cartilage that had delaminated from my bone was removed," Vonn said, without specifying which bone. "My crash in Lake Louise last year was much more painful than I let on, but I continued to race because I wanted to win a medal in the Olympics for my late grandfather."

Vonn achieved that goal by winning a bronze medal in downhill at last year's Pyeongchang Games.

But then she crashed again during training in Copper Mountain, Colorado, in November, and tore the lateral collateral ligament and sustained three fractures in her left knee.

"Despite extensive therapy, training and a knee brace, I am not able to make the turns necessary to compete the way I know I can," Vonn said.

But broken knees and all, nobody will be counting Vonn out as a contender in her final races.

"Can't wait to see some of you in the finish in Are," she said, "where I will give it my all one last time."