Russia's Maria Sharapova returns a shot to Serbia's Ana Ivanovic during their quarter final match at the Porsche tennis GP in Stuttgart, Germany, Friday, April 26, 2013. Sharapova won the match with 7-5,4-6 and 6-4. (AP Photo/dpa, Daniel Maurer)
(The Associated Press)

Sharapova, the defending champion, needed more than 3 hours to overcome Lucie Safarova a day earlier. This one was an hour shorter but nearly as intense.

"It was hard to get my body going, I need some time to warm up a little," Sharapova said. "Another tough one."

Sharapova will play third-seeded Angelique Kerber, who defeated Yaroslava Shvedova of Kazakhstan 6-3, 7-6 (2) to reach her third semifinal of the season.

Against Ivanovic, another former No. 1 and the 2008 French Open champion, Sharapova squandered a 4-1 lead in the third set before breaking serve again and serving out the match on her second match point.

Last year, Sharapova used the indoor clay-court tournament to warm up for the French Open, where she won the title.

Kerber is aiming for her first title of the year after finishing runner-up in Monterrey. She's made the semifinals in Stuttgart for the first time.

Shvedova trailed 4-1 before breaking back. But she dropped her serve again with two errors from the baseline. The two traded breaks in the first three games of the second set before Kerber opened a 3-1 lead, but Shvedova pulled even at 3-3.