Federer beat Murray in both of their meetings at Wimbledon, in the semi-final in 2015 and the final in 2012

Swiss great Roger Federer hopes retiring Briton Andy Murray can finish his career “the way he wants” at Wimbledon later this year.

Meanwhile, world number one Novak Djokovic says he will carry “beautiful memories” from his time on and off court with the Scot.

Murray, 31, plans to retire after Wimbledon but admits the Australian Open could be his final tournament.

“The news has hit us top guys hard,” Federer, 37, said. “I hope he can play a good Australian Open and he can keep playing beyond that.”

“I was disappointed and sad, a little bit shocked, to know now we’re going to lose him at some point,” said Federer, who has won an all-time record 20 Grand Slam singles titles.

“But we’re going to lose everybody at some point. It’s just now that it’s definite.”

In addition to his major titles, Murray also won two Olympic golds and 45 ATP tournaments, and led Britain to the 2015 Davis Cup.

“He won everything he wanted to win. Anybody would substitute their career with his,” added Federer.

“It’s a tough one, but on down the road he can look back on and be incredibly proud of everything he has achieved.”

“I will carry beautiful memories from the court and off the court with him. We’ve played lots of epic matches,” said Djokovic, who starts against American qualifier Mitchell Krueger on Tuesday.

“To see him struggle so much and go through so much pain, it’s very sad and it hurts me as his long-time friend, colleague, rival.”

The pair played together in a practice match in Melbourne on Thursday, hours before Murray made his announcement the following morning, but Djokovic insisted he was not holding back against the Scot.

“It was very obvious for everyone – you didn’t need to be on court – to notice he’s struggling and not moving as well as he normally does,” he said.

Djokovic says he can relate “a little bit” to Murray’s predicament after having elbow surgery last year before recovering to win the Wimbledon and US Open titles.

“I think his injury of the hips is something certainly far worse than my injury, because it’s obviously something he’s been carrying for couple of years,” he said.”He’s unable, even after surgery, to get back to the desired level. As an athlete, injury is probably the biggest obstacle and enemy that you can have.”

“If he is not proven guilty, he stays innocent. If he’s proven guilty, that’s a completely different situation for us and we have to address it,” Djokovic said. “He’ll remain president until the end of his term. Whether there’s a renewal or not, it’s going to be decided in the next period,” Djokovic said.