LONDON (AP) -- Roger Federer had never lost his opening match at the ATP World Tour Finals since the elite tournament moved to London in 2009.
Until now, that is.
On the back of a chaotic and disappointing season, the former World No. 1 was beaten on Tuesday for the second time in less than a week by defending champion Novak Djokovic 6-4, 6-7 (2), 6-2.
The Serb extended his winning streak to 18 matches after capturing his sixth title of the season last week in Paris, where he defeated Federer in the semifinal. Djokovic kept alive his chances of overtaking Rafael Nadal in the race for the year-end No. 1 spot.
''It was a big challenge physically,'' Djokovic said. ''Only 48 hours ago I was playing in Paris, so to be able to play this well and beat Roger is incredible.
''I have to enjoy the win and then think about the recovery because it's a big win. The good thing is, there is a day off. I'm going to try and recharge my batteries mentally and physically and get ready for (Juan Martin) Del Potro.''
Djokovic is attempting to finish No. 1 for the third year in a row but Nadal, who eased past David Ferrer 6-3, 6-2, needs only a win against Stanislas Wawrinka on Wednesday to be guaranteed the top spot.
This 31st encounter between Federer and Djokovic - a remake of last year's final - produced a somewhat disjointed match laced with unforced errors and flashes of brilliant tennis leaving both players looking exhausted toward the end of the match.
''Again, I was able to recover from all those matches and actually felt physically somewhat fine,'' said Federer, who won his last Grand Slam title at Wimbledon in 2012 and has only two victories against top-10 opponents in 2013. ''So I regret not having taken my chances better maybe.''
Federer, the oldest man in the draw at 32, refused to draw early conclusions from a season in which he had back problems and dropped to seventh in the rankings.
''The season is not done yet,'' he said. ''Let's talk about this stuff in hopefully four matches.''
Federer and Djokovic neutralized themselves until the ninth game when the Serb was down 15-30. A double fault gave Federer his first break point, but he sent a forehand wide on the next point. Djokovic then took the next two points to hold his serve.
The Serb earned two break points in the next game with a superb backhand return. The cheering from the legion of Swiss supporters packed in the stands didn't help Federer as he fluffed a forehand to lose the set.
After rallying from 0-40 to break Djokovic for a 3-2 lead in the second set, Federer dropped his serve in the next game. He double-faulted after Djokovic earned a break point with a backhand that hit the net cord before going over.
Serving for the set at 5-4, Federer made another unforced error on his usually reliable forehand to squander a set point. Djokovic seized his chance, sending Federer in the ropes with a stretched crosscourt winner before leveling at 5-5. Federer smashed a ball toward the scoreboard hanging over the court in frustration.
Federer kicked back into life in the tiebreak, winning the last five points with a string of beautiful shots that included a backhand volley, a crosscourt winner, and a perfect lob that Djokovic failed to return.
Djokovic looked unfazed at the start of the third set to break Federer at love. He then saved a break point to consolidate his lead before taking Federer's serve again after a long rally for a 4-1 lead. He sealed the match on his first chance.
Despite his easy win, playing indoors will never be ideal for Nadal. The Spaniard has won all four Grand Slam tournaments and the Olympic title in his career but has never triumphed at the season-ending ATP World Tour Finals.
''I like the sunshine,'' Nadal said when asked about the difference between playing indoors and outdoors.
''The feeling on the ball, on your racket, is different'' when playing indoors, Nadal said. ''All of these small things that make you feel a little bit strange.''
The conditions didn't seem to bother him Tuesday as he beat fellow Spaniard Ferrer 6-3, 6-2 on the indoor court at London's O2 arena.
''I'm happy. The court is in perfect condition here,'' Nadal said. ''It's a good start for me, positive one.''
Nadal came close to winning the event in 2010 when he lost in the final to Federer. He didn't play last year because of a knee injury that kept him away for seven months before his successful comeback in February.
The 13-time Grand Slam champion traded early breaks with Ferrer and then began dictating play from the baseline, forcing Ferrer into errors. Nadal converted six of seven break points, and Ferrer had 33 unforced errors.
''He arrived a little bit tired after playing the final (in Paris),'' Nadal said. ''I played with a little more calm than the other day (against him).''
Nadal earned his 21st win in 26 matches against Ferrer, but only his first indoors.
Nadal and Ferrer play in Group A, along with Stanislas Wawrinka, who beat Tomas Berdych in his opening match on Monday. Djokovic and Federer are in Group B with Juan Martin del Potro and Richard Gasquet.