FEZ, Morocco (AP)—Moroccan wild card Nadia Lalami upset top-seeded Aravane Rezai of France 2-6, 7-6 (5), 6-4 to advance to the quarterfinals of the Grand Prix SAR on Wednesday.

The 497th-ranked Lalami broke twice in the final set and served out the match on her first opportunity to ensure Rezai still hasn’t won consecutive matches since July.

American Melanie Oudin upset third-seeded Lourdes Dominguez Lino of Spain 4-6, 6-1, 6-2.

Rezai, who had 11 double faults, came back from 5-1 down in the second set only to lose the tiebreaker at the clay-court tournament.

The Frenchwoman has won four WTA titles but has been hampered by personal problems recently. She hired coach Alexia Dechaume this week in a bid to revive her career and get ready for the French Open next month.

Lalami will face either Eleni Daniilidou of Greece or Kirsten Flipkens of Belgium.

Greta Arn of Hungary overcame problems with her serve to beat Kristyna Pliskova of the Czech Republic 6-4, 6-4.

The fourth-seeded Arn, who won her second career title in Auckland in January, had eight double faults but managed to save all four break points she faced.

Arn will face seventh-seeded Simona Halep of Romania, who beat Alla Kudryavtseva of Russia 6-2, 6-4. Halep went from qualifying all the way to the final last year, still the best result of her career.

Slovenia’s Polona Hercog needed almost three hours to beat South Africa’s Chanelle Scheepers 6-7 (6), 7-6 (1), 6-2.