- Swiss suffers problem in practice
- He aims to return at Italian Open
- Has played in only three tournaments all year
- Serena Williams also ruled out
The 34-year-old said Monday he was pulling out of the Madrid Masters after suffering a back problem in practice.
The world No. 3 -- who had knee surgery in February -- has withdrawn from several ATP Tour tournaments in 2016, featuring in just the Australian Open and events in Brisbane and Monte Carlo.
He told a news conference he would now focus on ensuring he was ready for the Italian Open in Rome, which begins on May 8 and is one of the clay-court events ahead of the French Open.
"I arrived and I was okay, and then I practiced on Saturday and hurt my back a little bit in practice," 17-time grand slam winner Federer explained.
"Then I was scheduled to practice yesterday and today, but I just don't feel like I can practice."
Federer, who had been due to play either Nicolas Mahut or Joao Sousa on Wednesday, added: "I don't want to take more chances, as I know I'm not going to be fully ready (for that match).
"I would rather play it safe and rest now and get ready for Rome."
The Swiss, who won the event in 2012, said he was "frustrated" and "a little bit sad not to be playing here."
His withdrawal from the event comes after Serena Williams also pulled out
, missing her third tournament of the year.
Williams, a 21-time grand slam champion, said she was suffering from the flu and would not be "at 100%."