Andy Murray came back from a set down to beat Czech Republic's Radek Stepanek 4-6 6-2 6-3 in the quarter-finals of the Shanghai Masters.
The 25-year-old Scot, who looked off-pace at times, ground out the win to remain in contention for his third consecutive title at the Chinese event.
The Olympic and US Open champion threw his racquet to the floor in frustration before regaining his composure.
Murray said: "I managed to raise my level. It could have gone either way."
Stepanek, who had previously only beaten Murray once in five attempts, provided a much tougher test than the Briton's third-round opponent, Ukraine's Alexandr Dolgopolov.
Clinical Stepanek, ranked 41, broke Murray's serve in the fifth game and the world number three looked flustered as Stepanek took the first set with ease.
Their fortunes reversed in the second, however, with Murray looking more comfortable and breaking his opponent in the sixth game before seeing out the set.
The Czech began the decisive third set well, playing a sublime forehand winner to break for a 2-1 lead.
But Murray broke back immediately and, having finally found momentum, completed victory in two hours and 18 minutes.
Murray said: "He's a very tricky guy to play against, he played a lot of the match on his terms."
The British number one will face Roger Federer in the semi-finals after the Swiss beat Croat Marin Cilic 6-3 6-4.
Earlier, Stepanek's compatriot Tomas Berdych beat Frenchman Jo-Wilfred Tsonga 6-3 7-6 (7-4).
Fourth seed Berdych, 27, will play Serb Novak Djokovic - who beat Germany's Tommy Haas 6-3 6-3 - in the semi-finals.