Safina held her nerve to come through a final-set tiebreaker
Dinara Safina continued her fine form by ending Serena Williams's 17-match unbeaten run at the German Open.
The Russian, who beat world number one Justine Henin on Thursday, saw off Williams 2-6 6-1 7-6 (7-5) to secure a semi-final against Victoria Azarenka.
Safina described her victory as "one of the best matches of my life".
Elena Dementieva beat Jelena Jankovic to reach the semis, while Ana Ivanovic completed her delayed match with a win over Agnes Szavay on Saturday morning.
Second seed Ivanovic was level at one set all with Szavay on Friday when play was suspended due to darkness, and the Serb returned to complete 3-6 6-4 6-3 victory.
Ivanovic will be back in action later on Saturday in her semi-final against Russian Dementieva, who beat fourth seed Jankovic 6-3 2-6 6-3.
Earlier, unseeded Belarussian teenager Azarenka upset 15th seed Alona Bondarenko of Ukraine 7-6 (7-2) 6-2.
Williams was not overly concerned about her defeat but was frustrated by the number of unforced errors she committed.
"I didn't play well today, in no way whatsoever," she said.
"I could tell you 50 things I could go out there and do better, but it's better to lose when you've played badly than to lose when you've played well. I'm not going to dwell on this."
• World number one Henin has pulled out of next week's Italian Open because of fatigue, the Women's Tennis Association announced on Friday.