Roger Federer
Federer produced an aggressive brand of tennis to overwhelm Djokovic. Getty Images

Roger Federer produced a masterclass to thrash world number one Novak Djokovic and become the first player to qualify for the last four of the ATP World Tour Finals at the O2 Arena. Federer prevailed 7-5 6-2 to inflict upon Djokovic just his sixth defeat of the year and end his 23-match unbeaten run to regain his winning record against the Serb.

The 17-time major champion took the opening set with a break in game 12 to the delight of the partisan crowd in London but Djokovic staged a brief revival to end a run of four successive games in the second set. But Federer hit back with the continuation of an aggressive brand of tennis to claim two further breaks to end his opponents 38-match unbeaten indoors record.

Though the 43rd edition of the second longest rivalry in tennis history would come in the round robin stage rather than at the sharp end of the tournament, the meeting gave both players the chance to lay down a marker ahead of the latter stages. Djokovic had won three of the last four meetings to draw level at 21-all in the head-to-head record and could go ahead for the first time should he extend his winning run to 24 matches.

Following Kei Nishikori's three-set win over Tomas Berdych earlier on day three, Djokovic knew a second round robin victory would guarantee him a place in the last four. Alternatively, a straight sets win for Federer would see the six-time champion progress into the semi-final.

Despite the global appeal of both players, there was little doubt over the allegiance of the O2 Arena crowd. Federer enjoyed the lion's share of a support - evoking memories of the atmosphere of the US Open final against Djokovic in New York earlier in the year.

Aside from a break point in the opening game, Federer's support had plenty to shout about in the opening exchanges with the world number three becoming increasingly decisive in the rallies as the set progressed. Djokovic kept him at bay until serving to stay in the set for a second time he faced a set point, which Federer dumped into the net.

Djokovic continued to tighten up on the forehand side and he would eventually be punished when a net cord went Federer's way and a drop shot secured the opening set. That lead was then cemented with a break at the start of the second set as the prospect of a potential shock result drew closer.

The Serbian, who had suffered just five previous defeats in 2015, broke back at the first attempt but parity was short-lived as Federer created two move break point chances, taking the first via a net cord. The Swiss didn't have to wait to serve out the match, taking the second of two match points on Djokovic's serve to produce the surprise of the singles competition so far.