Novak Djokovic moved a step closer to winning his 60th tour-level title, but did not have things all his own way in a straight-sets victory over Leonardo Mayer in the Qatar Open quarter-finals.
The world number one beat Mayer 6-3 7-5 in Doha on Thursday to set up a last-four encounter with Tomas Berdych.
Top seed Djokovic was not at his brilliant best and had to come from a break down in both sets to come out on top against the Argentinian.
Ten-time grand-slam champion Djokovic made the most of five of his seven break-point opportunities and saved three to oust the world number 35.
Mayer took a 2-0 lead in the first set, but Djokovic responded by winning the next four games and a third break of serve wrapped up the opener.
Djokovic faced the prospect of being taken to a decider when Mayer served for the second at 5-4, but the Serb reeled off three games in a row to reach yet another semi-final.
Second seed Rafael Nadal needed three sets to see off outsider Andrey Kuznetsov in a contest which lasted two hours and eight minutes.
The 2014 champion Nadal won five of the 10 break points that he earned to triumph 6-2 5-7 6-4 and ensure he will face Ilya Marchenko on Friday.
Nadal was broken four times against the world number 79 from Russia, but refused to be beaten as he attempts to regain the title he won two years ago.
Marchenko was a surprise 6-3 7-6 (7-3) winner against seventh seed Jeremy Chardy after also beating David Ferrer, while third seed Berdych beat qualifier Kyle Edmund in straight sets, 6-3 6-2.