Updated

(SportsNetwork.com) - World No. 6 Milos Raonic said Saturday he will have foot surgery in the near future.

Raonic, who lost to Andy Murray in the quarterfinals of the Madrid Open on Friday, withdrew from next week's event in Rome due to the injury.

"I will be undergoing surgery to repair a nerve in my right foot. I withdrew from Rome to be ready to compete as soon as possible," the 24-year-old said on Twitter.

Raonic suffered the injury shortly before he played at the Monte Carlo Masters last month. He retired during his quarterfinal match at the tournament.

His spokesman, Austin Nunn, said there was no structural damage to the foot.

"That's the good news. The bad news is every single time (he steps) it literally feels like he's stepping on a tack or jellyfish, is the equivalent," Nunn told the Toronto Star.

"He is trying to get ready to play the French Open," Nunn added. "Rome is unfortunately just when the surgery can be done."

The French Open starts May 24 at Roland Garros in Paris.

Raonic has a 19-8 record this season.