Top seed Novak Djokovic reached a third Madrid Open final by beating Dominic Thiem in a gruelling semi-final.

Djokovic, 31, won 7-6 (7-2) 7-6 (7-4) in two hours and 24 minutes, securing a first clay-court final of the season – two weeks before the French Open.

Austrian Thiem, the runner-up in the previous two Madrid finals, led by a break in both sets but world number one Djokovic fought back to win.

He will play Rafael Nadal or Stefanos Tsitsipas in the final.

World number five Thiem had won his past two meetings with Djokovic, both on clay, and broke serve early to take a 2-1 lead.

Djokovic levelled at 3-3 but then had to fight off two more break points to prevent Thiem taking a 5-4 lead before the Serb dominated the tie-break to take the first set.

Thiem then missed break point opportunities in Djokovic’s first two games of the second set before eventually converting in the Serb’s third to move 4-2 in front.

But the 15-time Grand Slam champion broke back immediately and, despite failing to close out the match on serve at 6-5 after another break, he controlled the second tie-break to win.