Canadian Milos Raonic climbed four places to No. 31 in the world tennis rankings while Swiss star Roger Federer, the man who beat him in Sunday's Stuttgart Open final, reclaimed the top spot from Rafael Nadal.

The Spaniard fell to No. 2 in the new rankings, ahead of German Alexander Zverev, Argentina's Juan Martin del Potro and Grigor Dmitrov of Bulgaria.

Canadian Denis Shapavalov was unchanged at No. 23.

Raonic, who has won eight career ATP titles, reached a career-high No. 3 in the world rankings in November 2016. Stuttgart marked his first final since last June at the Istanbul Open, when he lost Marin Cilic.

The right-hander from Thornhill, Ont., is climbing back up the ATP rankings after an injury-riddled 2017.