Roger Federer snapped Novak Djokovic's 23-match winning streak to reach the semi-finals of the ATP World Tour Finals.
It was the most eagerly-awaited match of the group stages at London's O2 Arena and the capacity crowd of mostly Federer fans went home very happy after watching the Swiss upset the world number one 7-5 6-2.
Djokovic had only lost a single set since beating Federer to win the US Open in September, while this was his first defeat indoors since 2012.
There was plenty at stake for Federer in his 43rd meeting with Djokovic, not least supremacy in their head-to-head.
The pair were tied at 21-21 and a win for Djokovic, who is bidding for a fourth straight title, would have taken him ahead for the first time.
But the 28-year-old looked unusually flat and, once Federer had claimed the decisive break to win the opening set, a comeback never looked on the cards.
Djokovic is still in a good position to reach the last four, with a straight-sets win against Tomas Berdych, who lost to Kei Nishikori in the earlier match enough to put him through.
Federer had said in the build-up he did not feel far away from Djokovic's level despite the Serbian's dominance and the huge gap in ranking points.
He faced a break point immediately but a good serve helped him save it, and that seemed to settle him into the match.
Federer was managing to dictate just as much as Djokovic from the back of the court and it was the world number one that cracked first.
Djokovic saved one set point at 5-6 when Federer missed a forehand but a tentative smash from Djokovic led to a second.
This time Federer came up with a little piece of magic, feathering a backhand half-volley drop shot off a dipping pass onto the line.
The crowd roared their approval and, when Djokovic netted a backhand to trail 2-0 in the second, the writing seemed on the wall.
Federer played a loose game to give the advantage straight back but three more backhand errors from his opponent followed by a backhand pass that clipped the top of the net gave Federer another break for 4-2.
This time there was no lapse and, although Djokovic saved one match point, he put a backhand wide on the second, with Federer giving a little shake of the head as the world number one fruitlessly appealed to HawkEye.
Earlier, Nishikori and Berdych played out the first real contest of the tournament as the O2 crowd witnessed a third set for the first time this week before the Japanese player came through 7-5 3-6 6-3 after two hours and 23 minutes.
The Japanese player had admitted he was ashamed after winning only two games against Novak Djokovic in his opening match, while Berdych was well beaten by Roger Federer.
Nishikori, who reached the semi-finals on his debut last year, claimed the crucial break in the 11th game of the first set and seemed on his way to victory when he led 2-0 in the second.
But Berdych won five games in a row on his way to levelling the match.
Both players had chances in the third set but it was Nishikori who took his, breaking for 5-3 and then serving out the victory.