Guillermo Garcia-Lopez upset third seed Benoit Paire to reach the semi-finals of the Grand Prix Hassan II in Casablanca.
The 53rd-ranked Spaniard came through against the Frenchman 7-5 7-6 (4) in what proved to be a tight contest on the clay court surface.
Garcia-Lopez served for the match after breaking Paire for the fifth time, but the Frenchman broke straight back to force a tie-breaker.
The 30-year-old from La Roda prevailed, however, and next faces fellow countryman Roberto Carballes Baena for a place in the final after he dispatched Andrey Kuznetsov of Russia 6-4 6-2.
In the day's other matches, fourth-seeded Marcel Granollers of Spain had nine aces as he rallied to beat highly-rated youngster Pablo Carreno Busta 6-7 (4) 6-3 6-0 in an all-Spanish match, breaking his opponent's serve six times.
He next faces No 6 seed Federico Delbonis of Argentina, who beat Victor Hanescu 7-6 (5) 6-3, breaking the Romanian player's serve four times.