Roger Federer exorcised a Swiss Indoors demon by coming from behind to beat Juan Martin del Potro and claim an eighth title in Basel, winning 6-7 (5-7) 6-4 6-3.
Federer may have been the dominant force in his home tournament since a maiden triumph in 2006, but back-to-back final defeats to Del Potro in 2012 and 2013 will have rankled.
That frustration looked set to continue when Del Potro claimed the opening set on Sunday before Federer recovered to banish those memories and add yet another Swiss Indoors crown to his collection.
The win takes Federer to 95 ATP singles titles, surpassing Ivan Lendl and leaving only Jimmy Connors (109) ahead of him.
Federer twice went a break up in the opening set only to see Del Potro respond immediately, and the trend continued into the tie-break - the hometown hero went 3-0 up before collapsing to defeat.
Federer's failure to capitalise on his opportunities persisted as he wasted the chance to take a 3-1 lead in the second by sending a backhand volley long, but he snatched a 6-4 victory in the set to level matters and force a decider.
A dropped serve in the opening game of the third immediately put Federer on the back foot, but the world number two responded brilliantly with three games in a row that would ultimately prove decisive.
The Swiss set up three match points and converted the second when Del Potro sent a return long.