MADRID -- Roger Federer's injury woes continue.

In the latest setback to his already complicated season, Federer was forced to withdraw from the Madrid Masters on Monday because of a back injury.

The third-ranked Federer said he was hurt in practice over the weekend and didn't want to take any chances aggravating the injury.

"I would rather play it safe and rest up now," Federer said. "I'm very disappointed, to say the least."

The Swiss player was coming off a knee injury after the Australian Open that sidelined him for about two months. He also withdrew from the Miami Open in March because of a stomach virus.

"It's been a tough year," Federer said. "I hope it gets better from here."

The 35-year-old Federer, a three-time winner in Madrid, had been a late addition to the field this week. The tournament was not originally on his schedule, but the former No. 1 decided to include it as part of his preparation for the French Open in three weeks.

Federer appeared fine in practice Saturday but canceled his media appearance Sunday and had not been back to the courts, raising doubts about his participation.

He said he felt some pain while practicing Saturday and that it hadn't improved significantly since then, so he would not be fit to debut on Wednesday as scheduled.

"Sorry to the tournament for coming and leaving without playing," Federer said. "I arrived and I was OK, and then I practiced on Saturday and hurt my back a little bit in practice and then stopped early. I just didn't feel like I could practice."

Federer downplayed the seriousness of the injury, saying that it has happened to him before and he knows how to treat it.

"This is normal back things I've had in the past, which I guess is good, because I know how to handle it. I know how long it can take," Federer said. "It's the back stuff I kind of know. I'm OK with it. At least I know what it is."

His season has been marred by health problems. In February, the 17-time Grand Slam winner underwent arthroscopic surgery for torn cartilage in his left knee. When he was set to return to action at the Miami Open in late March, he had to withdraw because of a stomach virus.

Federer is still expected to play at the Rome Masters before heading to France for Roland Garros.

The Madrid Masters would have been Federer's fourth tournament of the season and the first since he lost to Jo-Wilfried Tsonga in the quarterfinals of the Monte Carlo Masters last month.

Federer lost to Nick Kyrgios in three sets in last year's second round in Madrid, a tournament he won in 2006, 2009 and 2012.

All other players ranked in the men's top 10 are playing in Madrid this week.

Last week, Serena Williams, who was set to be the No. 1 seed in the women's draw, withdrew because of an illness. The tournament said she had a fever and was feeling "less than 100 percent."

Williams won the Madrid tournament in 2012 and 2013.