Home favourite Federer has won the Basel title twice
Roger Federer endured a tricky 6-3 6-7 (6-8) 6-3 win over Bobby Reynolds to reach the second round of his hometown event at the Swiss Indoors in Basel.
The two-time defending champion took the first set but was taken to a tie-break in a tight second.
Federer clawed his way back from 5-1 down before the American world number 86 clinched it 8-6 to force the decider, but Federer came through.
Argentine second seed David Nalbandian saw off Albert Montanes 6-4 6-2.
The 2002 champion did not concede a single break point and beat the Spaniard in just 59 minutes.
Fellow Argentine and third seed Juan Martin del Potro beat George Bastl 6-2 6-4, while seventh seed Tomas Berdych went down 6-4 7-5 to Italy's Simone Bolelli.
Federer admitted Reynolds had made it very difficult for him in front of his home fans.
"He served very well and was hitting all corners," said the Swiss. "It was tough to read his serve.
"I didn't really have so much time to get used to conditions. I was only able to hit here for two hours in practice."