Roger Federer will face Novak Djokovic in a record-extending 12th Wimbledon final after overcoming Rafael Nadal 7-6 (7-3), 1-6, 6-3, 6-4 in an epic three hour semi-final.

Federer edged the first set on a tie-break with a run of four straight points before Nadal raced through the second set to tie up the scoreboard.

The eight-time Wimbledon champion Federer took the lead after winning the third set by a single break. He missed four match points serving to end the contest in the fourth but outlasted Nadal in a final rally to triumph.

Federer will compete for a record 21st grand slam title on Sunday against defending champion Djokovic, who beat Spain’s Roberto Bautista-Agut earlier Friday.