Maria Sharapova fought back to oust China's Li Na 2-6 7-6 6-3 and claim a place in the last four of the Madrid Open, as top seed and defending champion Serena Williams withdrew with a thigh problem.
Russian Sharapova, the eighth seed, showed all her battling qualities on the clay to edge the world number two and set up a semi-final clash with third-seeded Pole Agnieszka Radwanska or French qualifier Caroline Garcia.
Fourth seed Simona Halep of Romania beat 11th-seeded Serb Ana Ivanovic 6-2 6-2 and will face fifth seeded Czech Petra Kvitova, who benefited from Williams' withdrawal
The top seeded American and 17-times grand slam singles champion had been on a run of 15 consecutive victories in the Spanish capital and her victory over Carla Suarez Navarro in the last round brought up her 650th win on the women's tour.