David Goffin shocked overwhelming favourite Roger Federer on Saturday in the last four of the ATP Finals and will face Grigor Dimitrov for the title in the season finale.
Belgium's Goffin had never previously beaten the Swiss 19-time Grand Slam champion in six attempts and was in deep trouble after losing the first set but he stormed back to win 2-6, 6-3, 6-4.
In the later semi-final, Bulgarian sixth seed Dimitrov ended Jack Sock's fairytale late-season run 4-6, 6-0, 6-3 in a battle pitting the American's big forehand against Dimitrov's rapier-like backhand.
Goffin will be hoping for a different outcome from the round-robin meeting earlier in the week, which Dimitrov won 6-0, 6-2.
The Belgian had his work cut out against a pro-Federer crowd at London's O2 Arena as the Swiss was quickly into his stride, picking up volleys off his shoestrings and lacing backhands down the line.
World number two Federer, 36, won his ninth consecutive set against his 26-year-old opponent in just 33 minutes.
But the seventh seed, who 24 hours earlier admitted he did not have a clue how to beat Federer, hit back early in the second set to break and, rejuvenated, knocked his illustrious opponent out of his rhythm.
Federer, suddenly looking vulnerable and unable to dominate, was powerless to stem the tide as Goffin went on to level the match before breaking again early in the decider.
"I started to feel the ball better at the end of the first set, so I wanted to be more aggressive," said Goffin.
"As soon as I had the chance to go for the shot from the return and from the serve, (that) was the key, to go for the shot."
Goffin is only the sixth player ever to beat Rafael Nadal and Federer in the same tournament and the first since Novak Djokovic at the 2015 ATP Finals.
The Belgian, who beat Nadal in his round-robin opener, described his victory against six-time champion Federer as the best of his career.
- Nadal, Federer wins -
"Both are really special," he said. "It was the first time against Rafa. Then the semi-final for the first time for me here, and to beat Roger for the first time here in such a big event, big tournament, it was the perfect moment. Yeah, it is the best win of my career, for sure."
A disappointed Federer missed out on the chance to apply a final flourish to a brilliant season in which he won the Australian Open and a record eighth Wimbledon.
"It's a bit disappointing for me because it's indoors, it's a court I like to play on," he said. "But I had my chances and missed them. When he had them, he was very committed. I think that was the difference today."
It was the first time in the tournament's history that three debutants reached the semi-finals.
With Djokovic and Andy Murray missing from the eight-man field and Nadal forced to pull out injured after his loss to Goffin, Federer was strongly fancied to romp home.
But his departure means there will be a new name on the trophy on Sunday.
That could be Dimitrov, who roared into a 3-0 lead in the first set before Paris Masters champion Sock won six games out of seven to take the first set.
Undaunted, Dimitrov, 26, stepped up his game and bagelled the 25-year-old eighth seed in the second set in just 22 minutes to take the match into a decider.
In an enthralling third set, neither player was able to force a break until the crucial eighth game, when Dimitrov hit a forehand winner down the line to lead 5-3 after a double-fault from Sock.
He held his nerve to seal the contest on his fourth match point in a game lasting around 10 minutes.
"I was very composed with myself, I didn't let any negative thoughts come into my head," said Dimitrov. "Things went my way tonight and I'm more than happy.
"I'm so humbled to be in the final tomorrow. It's another match -- I just need to keep on playing. It's the last match of the season so full house, and we're on."