Roger Federer will play unseeded Frenchman Gilles Simon in the final of the Shanghai Masters on Sunday.
Federer, 33, ended world number one and defending champion Novak Djokovic’s 28-match unbeaten run in China.
Djokovic, 27, saved two match points as he held serve in game nine of set two, but Federer hit a seventh ace before a backhand volley secured a 6-4 6-4 win.
Simon, 29, reached his first Masters series final in six years with a 6-2 7-6 (7-1) win over Feliciano Lopez.
Simon, beaten by Britain’s Andy Murray in his previous Masters series final – in Madrid, dominated from the baseline and lost only two points when he got his first serve in.
“I was feeling really good from the baseline. I felt I almost didn’t lose one point from the baseline the whole match,” said the world number 29.
Simon has beaten fourth seed Stan Wawrinka and sixth seed Tomas Berdych in Shanghai
Simon, who had dropped as low as 44 in the rankings earlier this year, will now move inside the top 20 – and could rise as high as 15 if he beats Federer.
Federer, who saved five match points to get through round one, looked in excellent form as he repeated his 2010 Shanghai Masters semi-final victory over 2012 and 2013 winner Djokovic.
The Swiss, who will return to number two in the world rankings, broke serve in the fifth game of the first set after a couple of unforced errors by Djokovic.
The 17-time Grand Slam singles champion served strongly, sending down four aces to win a game in the first set, and also made 35 forays to the net, winning 20 points with a series of precise volleys.
He then kept his nerve from 15-30 down in game 10 of the second set, hitting a forehand winner, an ace and a backhand volley at the net to win in 95 minutes.