World number five Rafael Nadal beat Russia's Andrey Kuznetsov 6-3 5-7 6-4 to reach the semi-finals of the Qatar Open.
Nadal was made to work for his victory by the world number 79, but prevailed in just over two hours.
He will next face Ukraine's Illya Marchenko, who upset Frenchman Jeremy Chardy 6-3 7-6 (3).
Britain's Kyle Edmund plays Czech world number six Tomas Berdych later on Thursday.
Edmund could face Serb Novak Djokovic in the last four, after the world number one beat Argentina's Leonardo Mayer 6-3 7-5.