Maria Sharapova overcame Ana Ivanovic in three sets to reach the semi-finals of the WTA Porsche Grand Prix in Stuttgart.
The top seed from Russia had needed three sets and the same number of hours to get past Lucie Safarova in the previous round and was again made to work hard, eventually triumphing 7-5 4-6 6-4.
Sharapova squandered a 4-1 lead in the third set before decisively breaking serve again, allowing her to serve out for victory in the battle of two French Open champions.
"It was hard to get my body going, I need some time to warm up a little," Sharapova said. "Another tough one."
The reigning champion's next opponent will be Angelique Kerber, who defeated Yaroslava Shvedova of Kazakhstan 6-3 7-6 (7/2) on Friday to reach her third semi-final of the season.
World number six Kerber raced into a 4-1 lead in the first set before Shvedova showed some signs of resilience to break back.
The duo then exchanged breaks early in the second set before Kerber established a 3-1 lead, only to then allow Shvedova to pull back level at 3-3. It eventually came down to a tie-break, with the German taking it comfortably.
In the other semi-final, second seed Li Na will take on American Bethanie Mattek-Sands.
Na saw off fifth seed Petra Kvitova 6-3 7-5 in her quarter-final, while Mattek-Sands was a 6-4 6-2 winner against Germany's Sabine Lisicki.