Serena Williams has pulled out of the Madrid Open with a thigh injury ahead of her quarter-final against Petra Kvitova, the world number one has said.

Williams, winner of the last two editions of the tournament, suffered the injury in her first-round match against Belinda Bencic and with the French Open just two weeks away, she decided to pull out to give herself time to recover.

"I have a left thigh injury and, unfortunately, have to withdraw from this year's Madrid Open," the 32-year-old American said in a statement.

"It happened during my first-round match. It started to get better, but most importantly right now, I just need some time to rest and recover. It's beyond words. It's so frustrating.

"This is not the way I wanted this week to end."

The 17-times grand slam singles champion had been on a run of 15 consecutive victories on the Madrid clay and her victory over Carla Suarez Navarro in the last round brought up her 650th win on the women's tour.