LONDON — Roger Federer showed that memories of this year’s Wimbledon final are well and truly behind him.

In the first rematch between Federer and Novak Djokovic since that epic five-set final, the Swiss star dominated from the start to win 6-4, 6-3 Thursday and reach the semifinals of the ATP Finals.

"I played incredible, and I knew I had to," Federer said. "I was able to produce, it was definitely magical."

It was Federer’s first win over the Serb since 2015, having lost their last five meetings — including that Wimbledon final in July when Djokovic saved two match points in the fifth set.

”Obviously it's always special beating Novak, even more so because of what happened (at Wimbledon),” Federer said. ”But I didn't feel like I had to get rid of the ghosts or anything like that. I feel like I moved on pretty quickly after that.”

This match had little of the same drama as Djokovic gave up three cheap service breaks and Federer gave him no chance to get back in it.

The whole thing lasted just 1 hour, 13 minutes and ended with Djokovic being broken at love.

”He was the better player in all aspects and absolutely deserved to win,” Djokovic said. ”Just a pretty bad match from my side.”

The result means Djokovic was eliminated with a 1-2 record in the group stage, and ensures that Rafael Nadal will keep hold of the year-end No. 1 ranking. Djokovic had a chance to overtake Nadal and equal Pete Sampras’ record of finishing the year as No. 1 for a sixth time by winning the tournament.

”Of course that was a big motivation also for the end of the season,” Djokovic said. ”But every time you step on the court, you know there is something on the line.”

In a match between two players with a combined 36 Grand Slam titles and 11 ATP Finals championships, Djokovic was also broken at love in his second service game after double-faulting twice and hitting two shots into the net.

Federer faced his only break point at 2-1 in the second set but held and then broke for a 3-2 lead. He finished the match with just five unforced errors, and that included two double-faults.

"There was a lot riding on the match, and I came out and I think I served great, I had great anticipation, a clear game plan," Federer said. "It worked to perfection tonight, and hopefully not the last time against Novak."

Djokovic said he experienced some pain in his elbow early in the second set but didn’t think it will stop him from playing in the Davis Cup in Madrid next week.

”The pain was pretty sharp. But I could play the rest of the match, so if I had something really serious, I think I wouldn't be able to hold the racket,” he said. “So it was probably just an awkward, quick movement that I did. It did not pose any form of issues later on.”

Earlier, Matteo Berrettini made sure he left the tournament with a victory by beating Dominic Thiem 7-6 (3), 6-3.

That match was essentially meaningless as Thiem had already qualified for the semifinals after winning his first two round-robin matches, while Berrettini had no chance of advancing after two losses.

Thiem didn’t play anywhere near as well as in his wins over Federer and Djokovic but came from a break down to force a tiebreaker in the first set. However, Berrettini raced out to a 6-1 lead in the tiebreaker and converted his third set point with an ace.

In the second set, the Italian broke for a 4-2 lead and served out the match at love, sealing the win with a forehand drop shot.

After hitting 50 winners in his three-set victory over Djokovic on Tuesday, Thiem finished with just 13 in this match.

"Of course I felt a little bit the two first matches, and then also it's a bit of a tricky situation to know that I'm already through," the Austrian said. "Of course I was still trying to win that match 100%, but also, in the same time, I knew in my head that I have to take care for Saturday, because obviously it's the way more important match there."

On Friday, Rafael plays Stefanos Tsitsipas and defending champion Alexander Zverev faces Daniil Medvedev. Tsitsipas has already secured a spot in the last four, while the other three still have a chance of advancing.