WIMBLEDON, England — Roger Federer advanced to his record eighth Wimbledon final today, beating defending champion Novak Djokovic in four sets.

The six-time champion defeated Djokovic 6-3, 3-6, 6-4, 6-3 under a closed roof on Centre Court and is one victory from equaling two more records in an already record-laden career.

If Federer beats either Andy Murray or Jo-Wilfried Tsonga in Sunday’s final, he will take over the No. 1 ranking from Djokovic and equal Pete Sampras’ record of 286 weeks as the top-ranked player. He’d also equal Sampras’ record of seven Wimbledon titles, a mark he shares with 1880s player William Renshaw.

Murray and Tsonga were to play in the other semifinal later Friday.