MADRID -- Top-ranked Caroline Wozniacki was upset by Julia Goerges for the second straight tournament, losing 6-4, 1-6, 6-3.
Goerges rallied from 3-0 down to take the first set against Wozniacki after breaking twice. But she lost that momentum as the top-seeded Dane leveled the match with two breaks of her own in the second set.
The 27th-ranked German player broke Wozniacki in the eighth game of the deciding set to lead 5-3 before serving out the match. Goerges, who beat Wozniacki in the Porsche Grand Prix final last month, had 36 winners to her opponent's 11.
"I beat her twice in two weeks, so I'm pretty proud of myself," she said.
In the quarterfinals, Goerges will play Anastasia Pavlyuchenkova, who defeated fifth-seeded Samantha Stosur 7-6 (4), 6-3.
Bethanie Mattek-Sands secured the biggest win of her career as the 41st-ranked American knocked out the French Open champion Francesca Schiavone 7-6 (5), 6-3.
Mattek-Sands -- sporting knee-high socks and black mascara under her eyes -- will play Australian Open finalist Li Na after the Chinese player rallied to defeat Roberta Vinci of Italy 2-6, 6-2, 6-1.
"I'm really happy with my play on clay right now," Mattek-Sands said. "I feel like a true dirtballer."
Fourth-seeded Victoria Azarenka of Belarus dispatched Spanish wild card Arantxa Parra Santonja 6-0, 6-3 to also reach the quarterfinals.
Information from The Associated Press was used in this report.