Federer's win improved his hopes of overhauling Rafael Nadal for the world No 1 ranking with the ATP regular season ending next week at the Paris Masters
Roger Federer wins eighth Basel crown and his 95th career title with defeat of Juan Martin del Potro
Home favourite Roger Federer claimed his eighth Swiss Indoors title on Sunday with a 6-7, 6-4, 6-3 final defeat of Juan Martin del Potro.
The 36-year-old Swiss fought back from a set down to win the 95th ATP title of his career, taking him clear above Ivan Lendl into second on the all-time list behind Jimmy Connors' mark of 109.
It was Federer's first success against the Argentine in a Basel final, after the South American beat him in both 2012 and 2013.
Federer's victory boosts his hopes of taking the world No 1 spot from Rafael Nadal, with the regular season ending next week at the Paris Masters, followed by the year-ending ATP Finals in London.
The 19-time grand slam champion has now won a Tour-leading seven titles this season after beating Nadal in the Shanghai Masters final a fortnight ago.
"Congratulations to Juan Martin," Federer said. "You've had a great run since the US Open [when he beat Federer in the quarter-finals]) and before.
"I wish that I was able to play every week like you have, it's going to be difficult for me in the future to do that."
Del Potro will be playing for a fourth successive week in Paris after coming back earlier in the season from wrist problems, as he looks to snatch a late place for the eight-man event in London.
The 29-year-old Argentine reached the Shanghai semi-finals and won in Stockholm earlier this month before his run in Basel.
Federer lost only two sets during the week as he improved his head-to-head record to 17-6 over Del Potro, with a third win in four matches against the former US Open champion in 2017.
Federer broke Del Potro's serve in the first game of the match and again in the ninth, but was unable to serve out the set and also squandered a 3-0 lead in the tie-break.
Del Potro rattled off six points in a row and although Federer saved two set points on his own serve, a service winner from Del Potro gave him the set after 65 minutes.
A solitary break of serve in the 10th game of the second set was enough for Federer to force a decider, which he started by losing serve and hammering a ball into the roof of the arena in frustration.
However, that seemed to bring out the best in the 19-time grand-slam champion, who took the next four games in succession and eventually served out for a hard-fought win.
"It's unbelievable how well Roger is playing," Del Potro said. "I hope to be in such shape when I'm his age. But I doubt I will be."
Federer now stands 49-4 overall this season. He will make a late decision whether to play the Paris Masters next week, depending on his fitness.
In Vienna, Lucas Pouille had an easier time claiming the biggest win of his career by beating Jo-Wilfried Tsonga 6-1, 6-4 in the final of the Erste Bank Open.
Pouille's maiden ATP World Tour 500-level victory makes him the first player in 2017 to win on all surfaces, adding a hard-court crown to triumphs on the clay of Budapest and grass of Stuttgart.