(CNN) -- The Williams sisters remain on course for a semifinal showdown at the Italian after both had contrasting fortunes in their third-round matches in Rome on Wednesday, but world No. 2 Caroline Wozniacki crashed out.
World No. 1 Serena, playing her first tournament since winning the Australian Open in January, was taken to three sets by 49th-ranked German Andrea Petkovic before winning 6-2 3-6 6-0.
"It went crazy in the second set. I started really well but then I was down and out in the second," Williams, who lost her opening match in Rome last year, told reporters.
"But that's the great thing about playing matches, and I was glad to win because you're guaranteed another match -- and I need it because you could see today I was rusty."
The American, who defeated Timea Bacsinszky of Switzerland in her opening match on Tuesday after a first-round bye, will next face Maria Kirilenko.
The Russian, who upset French Open champion Svetlana Kuznetsova in the second round, progressed after beating Slovakia's Dominika Cibulkova 4-6 6-1 6-1.
If she wins that match, Williams could face her older sister Venus in the last four of the claycourt event.
Fourth seed Venus followed up her opening win over Patty Schnyder with another routine straight-sets victory, defeating Israeli 16th seed Shahar Peer 6-3 6-4.
The 29-year-old, playing her first event in a month due to her own knee injury, will next play fellow former No. 1 Jelena Jankovic.
The Serbian, seeded eighth, also progressed comfortably with a 6-2 6-0 demolition of Belgian 11th seed Yanina Wickmayer.
On the other side of the draw, Danish second seed Wozniacki suffered a 6-4 6-2 defeat by Spain's Maria Jose Martinez Sanchez in her third-round tie.
The world No. 26 will next play fellow left-hander Lucie Safarova after the Czech upset Polish eighth seed Agnieszka Radwanska 1-6 6-3 7-6 (7-2).
Sixth seed Elena Dementieva will not be able to take advantage of world No. 3 Dinara Safina's upset defeat on Tuesday, as she lost 6-1 7-6 (7-5) to former No. 1 Ana Ivanovic.
The Serbian will now take on Russian 14th seed Nadia Petrova, who battled to overcome Safina's conqueror, unseeded Romanian Alexandra Dulgheru, winning 6-0 3-6 6-2.