Roger Federer announced he will retire from professional tennis after next week’s Laver Cup in London.

The tennis great did not play any competitive tennis since a quarter-final exit against Poland's Hubert Hurkacz at last year's Wimbledon as he underwent a third knee surgery in 18 months.

"As many of you know, the past three years have presented me with challenges in the form of injuries and surgeries," Federer said on social media.

"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 clear. I am 41 years old.

"I have played more than 1,500 matches over 24 years. Tennis has treated me more generously than I ever would have dreamt, and now I must recognise when it's time to end my competitive career.

"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.

"This is a bittersweet decision, because I will miss everything the tour has given me. But at the same time, there is so much to celebrate."

For the Laver Cup, taking place from September 23-25, Federer is in Team Europe alongside Rafael Nadal, Novak Djokovic, Andy Murray, Casper Ruud and Stefanos Tsitsipas.

As for their opponents, Team World consist of Taylor Fritz, Felix Auger-Aliassime, Diego Schwartzman, Frances Tiafoe, Alex de Minaur and Jack Sock.