Roger Federer has warned Andy Murray not to return to the tour until he is fully fit following his Wimbledon withdrawal.

The two-time champion pulled out on the eve of the tournament after deciding it was too early in his comeback from hip surgery to play best-of-five-set tennis.

Murray made his return to competitive action at Queen’s Club last month after 11 months out and also played at Eastbourne, beating Federer’s compatriot Stan Wawrinka, who is still struggling for anything like full fitness after coming back from knee surgery in January.

This is the third time Murray has pulled out of an event just before the start, having also withdrawn from the US Open last summer and the Brisbane International in January.

Federer said: “I’m not going to tell him what to play and what not to play. I think most important is if he does return, he’s fully fit, because then anything is possible, especially for a former top guy. You have it. You don’t forget how to play tennis. It’s like riding a bike or brushing your teeth.

“I think the body just needs to be there. Seems right now it’s not the case. You wonder why did he then play Queen’s and Eastbourne? Only he and his team know.

“That’s the only advice I would give. I’ve realised that, if you do come back too soon, it’s always a problem. I feel like it lingers more. I’m hopeful he’s going to feel better and better as time goes by. If that means he comes back in a month, that’s great. If he comes back in a year, well, so be it.

“I’m hopeful to see a fully fit Andy Murray again. That’s what I care about really as a fellow rival, friend, guy who has been there before. That’s what I’m hopeful for.”

Murray was always cautious about his prospects of playing at the All England Club but did not make the final decision until after a discussion on Sunday with his doctor and support team.

Coach Jamie Delgado told The Wimbledon Channel: “It’s a huge shame. Wimbledon is a tournament like no other and a tournament Andy’s loved all his life, he’s obviously had so much success here.

“So a huge goal was for us to be definitely playing Wimbledon, being ready to play and doing well in it. It’s hugely disappointing for him, and obviously everyone involved with him, the team and all his fans, and the whole event as well wants Andy Murray playing at Wimbledon.

“He’s had so many great matches over the years and he’s one of the big names in tennis so you want those names in the draw. He’s made so much progress in the last six, seven weeks but just didn’t quite feel good enough and strong enough to play again.”