London - Roger Federer got one over world No 1 Novak Djokovic as the Swiss great booked his World Tour Finals last four spot with a straight sets victory on Tuesday.
Federer triumphed 7-5, 6-2 in their group stage clash in the packed 17 800-capacity O2 Arena in London, winning the key points at crucial moments to hand the Serb his first indoor defeat in 39 matches - a winning run stretching back to 2012.
Triple defending champion Djokovic, on a 23-match winning streak, suffered his first defeat since losing to Federer in the Cincinnati final on August 23.
But after becoming the first man through to this year's semi-finals, world No 3 Federer insisted Djokovic was still the favourite to win the season-ending tournament, which is disputed between the top eight players on a hard court.
Earlier in the same group of four, Japan's Kei Nishikori gave his hopes of reaching the semis a major boost with a 7-5, 3-6, 6-3 victory over Tomas Berdych of the Czech Republic.
"I know it's a big win. Could help me for what's to come in this tournament," Federer said.
"It's going to help me for next year. It's always good beating Novak or any top player.
"Still, to me, Novak is still the favourite of the tournament.
"He should make his way to the semis somehow... and he'll be the favourite in that probably, too, with the year he's had. He's far from gone.
"The way I know Novak, he's going to find a way to be tougher to beat from now on."
Victory for Djokovic in the final group match against Berdych on Thursday would see the Serb through to the semis; it would also prevent Nishikori from progressing, regardless of whether the Japanese beats Federer.
In the first set, Federer converted his second set point with a delicate backhand drop over the net that had the six-time champion's numerous fans on their feet celebrating.
Federer raced away in the second set, earning himself a match point with a tremendous backhand. However, Djokovic won a long rally to stay in the contest.
On Federer's second match point, Djokovic shot wide and challenged, but the ball was correctly called out as Federer celebrated victory.
Federer now leads Djokovic 22-21 in career matches between them.
Djokovic said the match "couldn't be worse".
"You have those days when you are not feeling your best, not even close to the best," he said.
"I made a lot of, lot of unforced errors. Just handed him the win, especially in the second set.
"Undoubtedly, he was the better player on the court. But I think I also allowed him to play and penetrate through the ball and dictate the tempo from the baseline.
"I didn't have this follow-through on my shots, no depth, many mistakes. If you play this way against Roger, you have no chance."
Earlier, eighth-ranked Nishikori survived a second set wobble but recovered to beat world number six Berdych thanks to what he admitted was a "lucky" shot.
Both players lost their Finals group stage opener - Nishikori to Djokovic and Berdych to Federer. A second defeat for Berdych therefore left his semi-final hopes hanging by a thread.
Nishikori, 25, made the semis last year on his O2 Arena debut.
In the third and deciding set, Nishikori saved a break point at 3-3, the key moment in a match that lasted two hours and 23 minutes.
"Last shot, I went for it, closed my eyes. (It) was a little bit lucky I made that shot," he said.
Asia's top player said he was looking forward to Thursday's clash with Federer, the youngest player in the tournament facing the oldest.
"He's still improving himself, playing great tennis even though he's 34. He doesn't look old for me," he said.
Federer said of the Japanese: "He showed his talents very quickly and very early. It just took him a while because of his injuries to really, really break through. Now he's there and one of the best players."
Collated results from the third day of the ATP Tour Finals at London's O2 Arena on Tuesday (x denotes seeding):
Group Stan Smith
Kei Nishikori (JPN x8) bt Tomas Berdych (CZE x6) 7-5, 3-6, 6-3
Roger Federer (SUI x3) bt Novak Djokovic (SRB x1) 7-5, 6-2
Federer qualifies for semi-finals
Rohan Bopanna/Florin Mergea (IND/ROU) bt Jamie Murray/John Peers (GBR/AUS) 6-3, 7-6 (7/5)
Bob Bryan/Mike Bryan (USA) bt Simone Bolelli/Fabio Fognini (ITA) 6-3, 6-2
Bopanna/Mergea qualify for semi-finals