Novak Djokovic hailed the retiring Roger Federer as one of the greatest athletes of all time and said he would leave a lasting legacy for the world of tennis.

The 41-year-old Swiss great will play competitively for the last time at this week's Laver Cup, turning out for Team Europe alongside Rafa Nadal, Andy Murray and Djokovic - the three biggest rivals of his glittering 24-year career.

Federer, who has won 20 Grand Slam titles, has struggled with injuries in recent years and said last week that he would end his career after the Laver Cup in London.

"His impact on the game has been tremendous, the way he was playing, his style, effortless, just perfect for an eye of a tennis coach, player or just a tennis fan," Serbian Djokovic told reporters on Wednesday at London's Tower Bridge.

"He has left a huge legacy that will live for a very long time."

Djokovic beat Federer in four major finals including at Wimbledon in 2019, the Swiss's last Grand Slam final.

"Both Andy and I didn't know that this is going to be his last match, his farewell this weekend, so that makes this occasion even greater because he's one of the greatest athletes ever to play sport, any sport," said Djokovic, who is one major title behind Nadal's men's record of 22.

"His popularity on and off the court speaks for itself. So I'm sure we're going to have a blast this weekend."

This week's Laver Cup will be the first time that Federer, Nadal, Murray and Djokovic are playing together in an event since the 2019 Australian Open.

"It's great we will have a chance to spend some quality time off the court together," Djokovic told Eurosport.

"We have team dinners and will chat about tennis, sports, life. We don't normally do that on tour, we have our own teams and families, so this is quite unique.

"We all want to win and perform well but at the same time because of Roger's farewell and the opportunity to be alongside some of my greatest rivals in my career you also want to share some good times off the court too.

"The WhatsApp group is what keeps us together." (Reporting by Sudipto Ganguly in Mumbai; editing by Peter Rutherford)