Roger Federer and Rafael Nadal. Getty Images

Roger Federer has replaced Rafael Nadal as world number one in the latest ATP rankings published on Monday, after the Spaniard’s surprise quarter-final exit at the Madrid Masters.

The Swiss tennis maestro returns to the top spot despite not having played since March.

Former world number one Novak Djokovic slipped six places to 18th after his second-round defeat in Madrid, his lowest ranking since October 2006.

Madrid winner Alexander Zverev remains in third, but the man he beat in Sunday’s final, Dominic Thiem, dropped a place to eighth despite knocking out Nadal on his way to facing Zverev.

Thiem saw off Kevin Anderson in the semi-finals and it is the South African who inherits his seventh spot, the 31-year-old’s highest ever ranking.

The highest mover in the men’s charts is Madrid semi-finalist Denis Shapovalov with the Russian teenager jumping 14 rungs to a best-ever 29th.

ATP rankings as of May 14;

1. Roger Federer (SUI)

2. Rafael Nadal (ESP)

3. Alexander Zverev (GER)

4. Grigor Dimitrov (BUL)

5. Marin Cilic (CRO)

6. Juan Martin Del Potro (ARG)

7. Kevin Anderson (RSA)

8. Dominic Thiem (AUT)

9. John Isner (USA) 3,305

10. David Goffin (BEL)

11. Pablo Carreno (ESP)

12. Sam Querrey (USA)

13. Roberto Bautista (ESP)

14. Jack Sock (USA)

15. Diego Schwartzman (ARG)

16. Lucas Pouille (FRA)

17. Tomas Berdych (CZE)

18. Novak Djokovic (SRB)

19. Kyle Edmund (ENG)

20. Hyeon Chung (KOR)