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, 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.
"I was thinking about [the victory over Leonardo Mayer in the first round] midway through the match when I was up a set and a break going, 'Hmm, should I be here or elsewhere? I'm here, let's make the most of it,'" he said.
"I remember how lucky I got. Clearly I feel very fortunate being in the tournament. But that's sometimes how things go."
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.