Maria Sharapova remained on course for consecutive Madrid Open titles when she recovered from dropping the second set to beat Caroline Wozniacki 6-1, 3-6, 6-3 on Thursday and book a spot in the semi-finals.
Dane Wozniacki, the fifth seed and a Madrid finalist in 2009, had yet to drop a set on the clay in the Magic Box arena on her way to the last eight but had her service broken five times by third-seeded Russian Sharapova, who is chasing a 35th career title.
Sharapova will return to number two in the world behind American Serena Williams if she reaches the final.
Williams, the top seed and Madrid winner in 2012 and 2013, when she beat Sharapova in the final, faces local favourite Carla Suarez Navarro of Spain later on Thursday and is on course to meet Czech fourth seed Petra Kvitova in the last four.
Kvitova, the 2011 champion, faces unseeded Romanian Irina-Camelia Begu in their quarter-final.
Sharapova's semi-final opponent will be the winner of the match between Czech 13th seed Lucie Safarova and unseeded Russian Svetlana Kuznetsova.