Roger Federer beat Milos Raonic to win the Mercedes Cup in Stuttgart, his first event for two and a half months.
The Swiss had not played since the Miami Open in March, after choosing to miss the clay-court season, but the win in Germany gives him a 98th Tour title.
Federer, 36, beat Canadian Raonic 6-4 7-6 (7-3) in the final.
The 20-time Grand Slam champion had already secured his return to number one in the world rankings with victory over Nick Kyrgios in the semi-final.
The only break of serve came in the third game of the match with Federer clinching it with a backhand winner.
The second set was again tight as both players’ serve dominated on the grass court but Federer edged it on a tie-break.
“I played very well throughout the tournament, it is a great comeback for me. I am so happy to have won,” said Federer.
“I was hoping to play a couple matches here but I have played four and won them all. The last few have been very good.
“I hope I keep it up at Halle and Wimbledon. It will give me a boost as well being back at world number one.”
Federer also sat out the clay-court season in 2017 but last year lost on his return in Stuttgart before going on to win the Gerry Weber Open in Halle and claim an eighth Wimbledon title.
He will again compete at Halle next week, aiming for a record 10th title, before Wimbledon which begins on 2 July.
Elsewhere, Richard Gasquet earned his first title of the year and the 15th of his career after beating fellow Frenchman Jeremy Chardy to win the Libema Open at s’Hertogenbosch in the Netherlands.
The 31-year-old, who had not won a grass court title since the first two tournament wins of his career in Nottingham in 2005 and 2006, beat Chardy 6-3 7-6 (7-5).