Sharapova will be installed as the new number one next week
Maria Sharapova had to battle out a win over Caroline Wozniacki to reach the last eight of the Italian Open.
The Russian, who will be number one next week after the retirement of Justine Henin, won 6-4 7-6 (7-3) having been 5-1 down in the second set.
Serena Williams had earlier powered to a 6-4 6-3 win over Sara Errani.
Jelena Jankovic thrashed Russia's Maria Kirilenko 6-1 6-1 to set up a quarter-final against Venus Williams, who beat Vera Zvonareva 7-5 6-2.
Third seed and last year's runner-up Svetlana Kuznetsova was the big casualty of the day as she lost 6-2 6-4 to French qualifier Alize Cornet.
"My best performance until now was against (Agnes) Szavay who was ranked 13th," said the 18-year-old Frenchwoman.
I'd put two or three good points together and then the level sort of dropped
"Now it's against Kuznetsova who is number five (in the world). It's crazy, I'm really happy," said the teenager, who will play Serena on Friday.
"After beating Svetlana, why not Serena," she added.
For her part, Serena Williams is happy with her clay-court form so far.
"I'm definitely feeling much fitter than last year or the year before," she said.
"It's a good feeling, I've had enough match play and I'm feeling good."
Swiss ninth seed Patty Schnyder is also into the quarter-finals after recovering from a set down to beat Marion Bartoli of France 4-6 6-4 7-6 (9-7) and set up a clash with Sharapova.
Second seed Sharapova may be on the verge of reclaiming the world number one spot but she has been struggling to find her best form in Rome.
"Taking away what she was doing on her side of the net, from my point of view I thought there were just a lot of rollercoaster rides," said the Russian.
"I'd put two or three good points together and then the level sort of dropped, but that's alright.
"The good thing is I got a win and can play another match tomorrow."