Roger Federer will return as world no 1 in the new rankings next week after coming from behind to beat Nick Kyrgios 6-7 (2-7) 6-2 7-6 (7-5) in the semi-finals of the ATP Mercedes Cup in Stuttgart.
The 36-year-old Swiss will play Canada’s Milos Raonic in Sunday’s final.
Federer, who has won 15 successive matches on grass since being beaten in his opening match in Stuttgart last June, knew he needed victory on Saturday to topple Rafael Nadal from the top of the rankings.
But he was made to work hard for the honour as Kyrgios, playing in his first tournament after two months out with an elbow injury, refused to buckle in a contest that lasted just short of two hours.
Over their three career meetings, eight of their nine sets have now gone to tiebreak and there was little to separate them in Stuttgart where Federer conceded first, forced his way back into the match and then was taken all the way in the third set.
In the other semi-final, Raonic beat defending champion Lucas Pouille 6-4 7-6 (7-3) to reach his first final since the 2017 Istanbul Open.
The seventh-seeded Canadian has not won a title since the 2016 Brisbane International.