Novak Djokovic.

Novak Djokovic will compete for a third straight Masters title after he prevailed against Roger Federer in a three-hour epic to win 7-6 (8-6), 5-7, 7-6 (7-3) in the semi-finals of the Paris tournament on Saturday.

The 31-year-old reigning Wimbledon and US Open champion extended his unbeaten run to 22 consecutive matches as he looks to add to his previous two Masters triumphs in Shanghai and Cincinnati.

Federer, who was aiming for his 100th career title in the French capital, conceded the first set tie-break with two errors and was outplayed in the third set decider as Djokovic emerged victorious after the 37-year-old Swiss netted the last return.

Djokovic will go on to face Russia’s Karen Khachanov in Sunday’s final after the 22-year-old dispatched Austrian Dominic Thiem 6-4, 6-1 in the other semi-final.

The four-time Paris winner will have a chance to equal Rafael Nadal’s leading Masters record of 33 wins if he claims a fifth title on Sunday.

Regardless of his final result in Paris, Djokovic will return to the top of the ATP rankings for the first time since 2016 after Nadal was absent in France due to an abdominal injury.

His new status will celebrate a remarkable turnaround for Djokovic after dropping as low as 22 in the rankings at the beginning of the year. He becomes the first player outside the top-20 to rise to world number one since Marat Safin in 2000.

A rasping forehand opened up the first break point for Djokovic with a 1-0 lead, but he was unable to convert as the two grand slam giants stood firm behind their serves in the 47th meeting between the pair who have won 34 majors in total.

Federer saved a second break point trailing 4-3 with a timely volley, and a miscued forehand from the world number three offered a third chance, which he again escaped with a reflex reaction to an awkward bounce off the net cord.

With both players only dropping 15 points between them on their first serves, a tie-break was needed after an hour of enthralling tennis.

Federer took an early 2-0 lead as he surprised Djokovic with a shot straight into the his opponent’s body before firing down an ace.

Djokovic was 4-2 behind but he battled back to level the scores at 6-6 and two Federer errors gave him the first set advantage.

It was Djokovic’s turn to erase break points in the second set with Federer in front at 1-0 but he outlasted his Swiss opposite in another engaging trade-off to stay on serve.  

Djokovic, who previously beat Federer to win the Cincinnati Masters, finally wilted under rallying pressure with errors to unlock two break points, and Federer only needed one to take the set with a ferocious forehand down the line.

Federer saved two break points at the start of the decider and Djokovic smashed his racket at 4-4 after seeing two more break point opportunities pass him by as Federer outlasted him in another long rally to stay perfect on serve despite a dozen break points against him overall.

Neither man could find a match-winning break so a sudden death tie-breaker came into play with Djokovic’s unbeaten run and Federer’s hope for a century of career titles at stake.

Djokovic stormed into a 6-1 lead and even though Federer resiliently rallied to save two match points, he netted the final return to confirm another success for the supreme Serb.

He next faces Khachanov where their last meeting was in the third round of this year's Wimbledon.

Djokovic claimed that match in straight sets as he progressed to lift his 13th major title in July. 

Khachanov, who is ranked 18th in the world, enters his fourth senior final and has claimed two titles already this year in Marseille and Moscow.