History repeated itself as Dominic Thiem defeated Novak Djokovic to reach the final of the Nitto ATP Finals.

Having fought back from 4-1 down in a final-set tie-break to beat Djokovic at London’s O2 Arena 12 months ago, this time Thiem recovered from 4-0 to claim a remarkable 7-5 6-7 (10) 7-6 (5) victory.

But the scoreline only told half the story, with US Open champion Thiem missing four match points in the second-set tie-break only to claw his way back from the brink himself.

The Austrian said: “It was for sure a mental battle. It got so tight in the second set tie-break. To play these big legends is always something special, playing for a finals here is also something very special.

“I thought that after my first big title in New York, maybe I’m going to be a bit more calm, but it was a mistake I guess. It was so much on the edge this match. I’m just incredibly happy to be through and will just try to get ready for the final.”

Last year’s clash was in the group stages, with Thiem going on to lose a similarly epic encounter against Stefanos Tsitsipas in the final.

This time he will take on either Rafael Nadal or Daniil Medvedev with a chance to finish a season that finally brought him a longed-for grand slam trophy with another big title.

Dominic Thiem clenches his fist during his dramatic victory
Dominic Thiem clenches his fist during his dramatic victory (John Walton/PA)

Djokovic won four straight titles in London from 2012 to 2015 but his efforts to equal Roger Federer’s record of six victories have come to nothing since.

Having not lost a completed match until the French Open final last month, meanwhile, Djokovic’s season has ended with a run of four losses in eight matches.

He praised Thiem, saying: “What he did from 0-4 in the third-set tie-breaker was just unreal. I don’t think I played bad. I made all of my first serves. He just crushed the ball.

“I was in a driver’s position at 4-0. I thought I was very close to winning it. He just took it away from me. But he deserved it, because he just went for it and everything worked.”

Djokovic was well below his best in a round-robin loss to Medvedev and, although he was much improved in his must-win contest with Alexander Zverev on Friday, there were still uncharacteristic errors.

Here, Djokovic was solid if not spectacular for the first 10 games while Thiem showed his frustration at a lack of precision.

The 11th game gave the third seed his breakthrough, though, as Djokovic unwisely kept coming forward and paid the price, dumping a volley into the net on the first break point of the match.

The world number one was criticised in his French Open final hammering by Nadal for overplaying the drop shot, and here he seemed to have replaced that with the drop volley.

Thiem confidently served out the first set and Djokovic looked hurried and harassed as he faced another break point in the fifth game of the second set, but this time his opponent netted a forehand.

This was the latest in a series of close matches played out between these two. Last year at The O2, Thiem won an epic group match, while Djokovic edged a five-set Australian Open final in January.

Djokovic had his first break point of the match at 4-3 but narrowly missed a return, while a couple of errors from Thiem presented his opponent with two set points at 6-5 but again the greatest returner the game has seen was unable to get the serve back.

Djokovic seemed to be having trouble freeing himself up but he was certainly not the only player feeling the tension in an extraordinary tie-break.

Novak Djokovic was feeling the pressure during a tense match
Novak Djokovic was feeling the pressure during a tense match (John Walton/PA)

Thiem served a double fault on the second match point and missed a forehand on the third, while a netted backhand on Djokovic’s second set point was the decisive moment.

It was nip and tuck all through the decider as well, but the momentum seemed to be gradually moving Djokovic’s way.

He let out a huge roar of frustration at a missed return at 5-4, 30-30, but that was nothing to the disappointment he must have experienced as Thiem wrestled the tie-break away from him.

Having played four poor points at the beginning, Thiem went for broke and it paid off spectacularly, leaving Djokovic helpless and heading home.