World number one Serena Williams fought off a determined Ana Ivanovic 2-6, 6-3, 7-5 on Friday to reach the semifinals of the WTA hard court tournament at Stanford.
The top-seeded American booked a Saturday showdown with eighth-seeded German Andrea Petkovic, who thwarted a possible all-Williams semifinal with a 6-1, 3-6, 7-5 triumph over Venus Williams.
Top-seeded Serena, playing her first tournament since she departed Wimbledon looking weak and woozy, said the one hour, 57-minute match against Ivanovic confirmed she had regained her fitness in the wake of the virus that hampered her at the All England Club.
"I'm feeling really good," she said. "I had some long rallies and I wasn't out of breath at all, so I was, like, 'Yay!'"
But former world number one Ivanovic, seeded fifth, didn't make things easy.
The Serbian took the opening set in just 25 minutes, but Williams had raised her level and taken a 5-2 lead with one break of serve in the second even before Ivanovic received on-court treatment for a tight hip after the seventh game.
Although she seemed to be in some discomfort Ivanovic held serve to narrow the gap to 5-3 before Williams pocketed the second set and broke Ivanovic to open the third.
"It wasn't very easy," Williams said. "Ana plays very well, this court is a little fast so she really was hitting a lot of shots. I just fought and stayed in there."
Trailing 3-1 in the third, Ivanovic won three straight games to take a 4-3 lead.
Williams broke Ivanovic for a 5-4 lead, but was broken herself in the next game before finally wrapping it up with one more break of Ivanovic's serve and a dominant service game of her own.
"It was really important for me," Williams said. "I wanted to come out with the win no matter what, and I'm really excited, actually, that I was able to win today."
She said she was expecting a tough match from Petkovic, who stormed through the first set over Venus Williams then held on in the face of the American's determined comeback attempt.
Williams, who had beaten fourth-seeded Victoria Azarenka on Wednesday night, won six of the last seven games of the second set to force a decisive third set.
Petkovic twice went up a break in the third only for Williams to break back, but Petkovic won the last two games to seal the win after one hour and 49 minutes.
"She played really well, and I wasn't as on today as in previous days," Williams said. "But you're going to have days like that and have to work through them."
Petkovic said beating both Williams sisters in the same tournament was a tall order.
"You don't ever have the feeling you have something under control when you play either of them," she said. "They can hit so hard, and play consistently well. You always have to be on your toes."
In the other semifinal, third-seeded German Angelique Kerber will take on unseeded American Varvara Lepchenko.
Kerber steamrolled Spain's Garbine Muguruza 6-2, 6-1, while Lepchenko -- who ousted second-seeded Agnieszka Radwanska in the second round -- needed only 51 minutes to dismiss US qualifier Sachia Vickery 6-1, 6-0.