The 20-time major winner can go back to to top of rankings with victory over Nick Kyrgios on Saturday
Roger Federer one win away from taking No 1 spot from Rafael Nadal
Roger Federer will return to world No 1 on Saturday if he beats Nick Kyrgios in the semi-finals of the Stuttgart Cup.
The Swiss player's 6-4, 6-4 win over Guido Pella on Friday leaves him one victory away from usurping Rafael Nadal at the top of the rankings.
Federer, who is playing in first tournament since April, lost the No 1 slot to Nadal when he was beaten in his opening match in Miami by Thanasi Kokkinakis.
Federer sat out the clay season, which was dominated by Nadal, with the focus on the grass season and winning a ninth Wimbledon title in July.
Kyrgios, who is also back in action after a period out, his due to injury, defeated Feliciano Lopez 6-4, 3-6, 6-3 in their quarter-final.
Saturday's other semi-final sees Milos Raonic go up against Lucas Pouille.
Raonic defeated Tomas Berdych 7-6, 7-6, while Pouille got the better of Denis Istomin 6-4, 6-7, 6-3.