Swiss tennis star Roger Federer outplayed Novak Djokovic of Serbia at the O2 Arena in London to reach his 16th semifinal out of 17 appearances at ATP World Tour Finals.

The defeat also fired Djokovic from the race of number 1 and will see Rafael Nadal remain the numero uno till the year-end for the fifth time.

Ahead of the 49th encounter between the two great players, the world number 2 held a 26-22 advantage and won the last five meetings, including their five-set final at this year’s Wimbledon Championships.

But the 38-year-old dominated on Thursday night, breaking Djokovic three times and only facing break point once. The Swiss legend wrapped it up 6-4, 6-3 after 73 minutes.

“I played incredibly, and I knew I had to because that’s what Novak does and I was able to produce. So it was definitely magical,” Federer was quoted by the ATP Tour official website.

Two days ago, Djokovic suffered a painful loss to Dominic Thiem, who came from behind to edge the in-form Serbian 7-6 (5), 6-3 and 7-6 (5).

“Mentally it was tough to lose a match like that a few nights ago,” said Djokovic. “I started off this tournament amazingly. I felt great. Won Paris. Played really well. Just probably things kind of shifted in terms of the way I feel on the court, and my confidence level wasn’t high today, so Roger could sense that and he used it very well.”

Notably, Federer was second in Group Bjorn Borg behind Austrian Dominic Thiem. He will face the winner of Group Andre Agassi on Saturday. Tournament debutant Stefanos Tsitsipas, who is the youngest player ranked in the top 10, had beaten defending champion Alexander Zverev 6-3, 6-2 on Wednesday to qualified for the semifinals from Group Andre Agassi.