Andy Murray remains hopeful he will play at Wimbledon, but admits it is unlikely to be in the singles competition after undergoing surgery on a spinal cyst.

The 37-year-old, who confirmed he is planning for the Olympics in Paris to be the final event of his career, had the procedure on Saturday after experiencing weakness in his right leg while playing at Queen’s last week.

He was forced to pull out of his second-round match against Jordan Thompson at the London tournament after just five games.

Murray, who has won two of his three Grand Slams at Wimbledon, said he had been told to seek immediate treatment by multiple surgeons.

“The last week’s been pretty tough,” said the British former world No 1. “There’s obviously a lot going on with me planning on finishing at the Olympics.”

He added: “Although the surgery is not a major surgery, the problem was a serious problem because, if the cyst continues to grow – obviously at Queen’s I basically lost the strength, coordination and everything in my right leg on my way to the court – you’re likely to have other complications as well.”

The Scot, who is also a two-time Olympic singles champion, said the operation had gone “really, really well” and he was hitting balls again but added that it was “impossible to say” when he would be able to compete.

The draw for the singles takes place on Friday, with first-round matches starting on Monday.

Later Thursday, Murray and brother Jamie were awarded the final wildcard for the men's doubles by the All England Club.

“It’s complicated, and it’s made more complicated because I want to play at Wimbledon one more time,” added Murray of his current predicament.

“I would say it’s probably more likely that I’m not able to play singles right now.

“I spoke to my brother a couple of days ago in terms of the doubles to see if he wants to find someone else to play with, and I was obviously absolutely fine with that.

“But he also wants the opportunity to try to play. We'll see how the next few days go.”

Olympic entries will be confirmed next week, with Murray hoping to play singles and doubles with Dan Evans.

Should Murray not make the Olympics, he revealed he could yet play another event, such as the US Open, in order to bow out on his own terms.

“Because of what I put into the sport over the last however many years, I would at least like to go out playing a proper match where I'm at least competitive,” he said.