Tennis legend Roger Federer announced his upcoming retirement Thursday, saying that next week’s Laver Cup in London will be his final ATP event.

In a video posted on Twitter, Federer, 41, called it a “bittersweet decision” to retire after an illustrious 24-year career in which he won 20 Grand Slam tournament titles.

“As many of you know, the past three years have presented me with challenges in the form of injuries and surgeries,” Federer told his fans in the video. “I’ve worked hard to return to full competitive form. But I also know my body’s capacities and limits, and its message to me lately has been dear. I am 41 years old.

“The Laver Cup next week in London will be my final ATP event. I will play more tennis in the future, of course, but just not in Grand Slams or on the tour.”

Federer is regarded as one of the greatest tennis players of all time, with 103 career wins on the ATP Tour, second-most only behind Jimmy Connors’ 109. His 20 Grand Slam titles are third all-time among male players, trailing only Novak Djokovic and Rafael Nadal.

The Swiss icon also has a record eight Wimbledon titles, and he was the world’s No.1 player for a total of 310 weeks, second-most since 1973 behind only Djokovic. However, Federer does hold the record for most consecutive weeks at No.1, occupying the top spot for 237 straight weeks from February 2004 to August 2008.

Federer also served the sport as president of the ATP Player Council from 2008-14, later rejoining the council from 2019-22. He was influential in increasing prize money for players.

Through the Roger Federer Foundation, he has assisted almost 2 million children in low-income African countries.

On the court in recent years, Federer has battled several injuries, including multiple knee surgeries. He has not appeared at the U.S. Open since 2019 and did not play in a single Grand Slam event in 2022.

Federer’s last victory on the ATP Tour was at the 2019 Swiss Indoors Basel. His last appearance in a Grand Slam final was at Wimbledon in 2019, where he lost a five-set thriller to Djokovic that took nearly five hours to complete.

Still, there was hope that Federer might return to the ATP Tour in 2023. The tennis legend told Swiss newspaper Tages-Anzeiger in June he was “definitely” hoping to get back on the court regularly next year.

Federer’s decision to retire from tennis comes on the heels of another tennis legend retirement in Serena Williams. Her appearance at the U.S. Open earlier this month, where she lost to Ajla Tomljanovic in the third round, is expected to be her final tournament.

ATP Chairman Andrea Gaudenzi released the following statement on Federer’s retirement:

“Roger’s impact on tennis, and the legacy he’s built, are impossible to overstate. Over 24 years as a professional, Roger brought millions of adoring fans into the game. He spearheaded an incredible new era of growth and elevated the popularity of our sport. Few athletes have transcended their field in such a manner. Roger made us all feel proud and fortunate to be part of the same sport.

“He redefined greatness on the court, while his champion spirit, sportsmanship, and the way he played the game thrilled audiences around the world for decades, inspiring so many to pick up a racquet. Beyond the court, he is and will continue to be a true role model and ambassador, always giving so much of himself to the fans.

“Roger’s steadfast commitment to the ATP Tour throughout his career, as well as his many years of service on the Player Council, helped drive progress for fellow players and the entire sport. His humanitarian impact has been equally profound through the RF Foundation.”