(CNN) -- Top seed Caroline Wozniacki has crashed out in the last 16 of the Sony Ericsson Open in Miami, beaten in three sets by Germany's Andrea Petkovic.
Petkovic, seeded 21st and ranked 23rd in the world, took two-and-a-half hours to reach the quarterfinals courtesy of a shock 7-5 3-6 6-3 success.
The 23-year-old Petkovic, who becomes the first German woman to beat a world number one since Steffi Graf defeated Martina Hingis in the 1999 French Open final, told the official WTA website: "I feel great. I don't really believe it. I'm still caught up in my emotions.
"I had a strict gameplan thanks to my coach, and I stuck to it. Sometimes when the other player starts playing better, like Caroline did in the second set, you can panic and lose your gameplan, but I stuck to it until the end.
"Most players think they can overpower Caroline, but that's not the right approach because she can bring every ball back. I mixed it up a little bit and thankfully it worked in the end."
In other women's matches, Russian 16th seed Maria Sharapova rolled back the years, overpowering fourth seed Samantha Stosur 6-4 6-1 to reach the last eight.
Meanwhile, second seed Kim Clijsters was given a scare by Spain's Maria Jose Martinez Sanchez.
The Belgian struggled to a 6-4 4-6 6-3 victory and she told the official WTA Tour website: "A couple of times my footwork wasn't right and I wasn't playing how I should have been, but I'm happy I was able to move through."
The victory was the 500th of Clijsters' career and she next faces former world number one Ana Ivanovic, who advanced after Virgine Razzano of France was forced to retire through injury.
Third seed Vera Zvonareva of Russia beat Australian Jarmila Groth 7-6 6-2 while fifth-seeded French Open champion Francesca Schiavone beat Lourdes Dominguez Lino of Spain 6-4 7-6.
Meanwhile, there were no shocks in the men's section with victories for both top seed Rafael Nadal and third seed Roger Federer.
Two-time winner earned his 20th win in 23 matches with a 7-6 6-4 success over Juan Monaco while world number one Nadal saw off fellow-Spaniard Feliciano Lopez 6-3 6-3.
Federer will next play Belgian Olivier Rochus, who recovered from the loss of the opening set to edge past Russian Mikhail Youzhny 1-6 6-3 6-3.
Seventh-seeded Wimbledon finalist Tomas Berdych beat Argentine Carlos Berlocq 7-6 7-5 while 11th seed Nicolas Almagro of Spain was beaten 6-1 3-6 6-1 by Germany's Florian Mayer.