Russian qualifier Andrey Kuznetsov beat 2006 Australian Open finalist Marcos Baghdatis 6-4, 4-6, 6-4 to reach the quarterfinals of the Grand Prix Hassan II on Wednesday.
The second-seeded Cypriot, playing his first clay match this season, dropped serve five times.
Kuznetsov saved a break point in the eighth game of the decider before holding serve to lead 5-3.
In other second-round upsets, Pere Riba of Spain rallied to beat fourth-seeded Andrey Golubev of Kazakhstan 0-6, 6-1, 7-5, and Pablo Andujar of Spain downed No. 6 Jeremy Chardy of France 7-6 (6), 6-1.
In the quarterfinals, Riba faces Andujar and Kuznetsov will play eighth-seeded Victor Hanescu of Romania, after he beat Michael Berrer of Germany 6-4, 7-6 (4) to reach the last eight of a tournament for the first time this season.
Hanescu, a French Open quarterfinalist in 2005, broke Berrer once in each set.
The top-seeded Albert Montanes of Spain plays Filippo Volandri of Italy in remaining second-round matches on Thursday.