Roger Federer has gone to the ATP finals in the last four at the expense of Novak Djokovic with a brilliant victory over his big rival at the O2 Arena.
Swiss third-placed Federer, 38, won 6-4 6-3 in a carvery match that eliminates the Serbian second seed of the London season-end tournament.
Federer will face Rafael Nadal or Stefanos Tsitsipas in the last four games.
Djokovic's defeat also means Spaniard Nadal should finish as world number one by the end of the year.
Nadal, 33, is far from reaching the last four, needing victory over Greek sixth seed Tsitsipas on Friday to have a chance.
However, if seventh-placed German Alexander Zverev wins fourth-placed Russian Daniil Medvedev, Nadal is out regardless of the result.
If the results work out, Nadal will overtake Andre Agassi Group and face Federer – who finished second with fifth seed Austrian Dominic Thiem in the Bjorn Borg Group – in Saturday's semi-final.
Two-time champion Federer, who missed Thiem's debut match, jumped for joy after winning a victory that helps avenge his defeat by Djokovic in the epic Wimbledon final in July.
Asked what he did differently at O2, Federer said: "I won the match point, I think. It was so close to Wimbledon. It was a privilege to play this game with so many ups and downs.
"I couldn't be happier now. I think it served very well, I had a lot of expectations, a clear game plan and it worked very well tonight – I hope it's not the last time against Novak."
Federer dominates battle for survival
The expectation for their first meeting since the exciting Wimbledon final was high when they met on the other side of the English capital in a situation few would have anticipated before the tournament.
When the draw was held last week, most hoped that the final match would be a deciding factor for who would lead the group.
However, the two players entered the fight for survival after Thiem threw them off the court for consecutive victories, giving the French Open finalist a spot in their last four matches at the O2 Arena for the first time.
Federer was the one who produced high quality performance at the crucial moment, with Djokovic looking bad and suffering from an elbow injury in the final stages.
Federer lost just three points in his serve in the first set, firing eight aces and winning all points behind his second serve, as even Djokovic's famous defensive game couldn't handle its accuracy.
While this victory does not completely compensate for the bitter defeat at SW19, which denied him his 21st Grand Slam victory, Federer's pleasure in avenging it was clear.
Federer lost two points in the championship before losing the Wimbledon longest singles final in a historic tie-end final, but relentlessly had his first opportunity here when Djokovic disintegrated.
& # 39; Not much I did right & # 39; – Djokovic
Djokovic, 32, has won his four previous games against Federer, but apart from a brief spell at the beginning of the second set, he rarely seemed to test the Swiss.
The current Australian Open and Wimbledon champion created just one breakpoint, which Federer saved in the fourth game of the second set and won just seven points from that point.
With imminent defeat, Djokovic quickly became ragged as Federer passed him to win four of his last five games.
In addition to losing the year as world number one, defeat also means that three-time Djokovic has not reached the semi-finals for the first time since 2011.
"It wasn't much I did correctly in this match, to be honest. Realistically, he was a better player in every respect and absolutely deserved to win," said Djokovic.
"He served very well, moved well, returned my serve very well. On your side, I think he did everything right."
"On my side, I was playing very neutral. I couldn't quite understand his serve. Just a very bad match on my side."
Djokovic then downplayed the significance of the elbow injury that occurred when he sought a return to baseline in the second game of the second set.
The Serbian said he hopes to be fit for the next Davis Cup finals in Madrid next week.
"The pain was very strong, but I could play the rest of the match," said Djokovic.
"If I had something really serious, I don't think I would be able to hold a racket. That didn't bring problems later."
BBC Tennis Correspondent Russell Fuller
Djokovic says Federer is a model for himself – and amid the pain of losing, he was able to enjoy a vintage performance by the 38-year-old.
When Federer serves as he did in the first set, no one can live with him: even though Djokovic has invited some of the pressure on himself, sending three double flaws in his first service and a half game.
Once broken in the second set, Djokovic cut off a downcast figure who felt his number had risen while Federer continued to glide across the court.
His victory guarantees Nadal will be number one at the end of the year for the fifth time. Federer and Djokovic have also achieved this five times. Indeed, there is very little to separate these three extraordinary players.