Roger Federer was tested before beating 28th-ranked Adrian Mannarino 4-6, 6-1, 6-3 in the Swiss Indoors quarterfinals on Friday.
The top-seeded Swiss saved two break points when trailing 3-2 in the decisive set, including with a backhand half-volley winner from the baseline.
Federer never gave the French left-hander another chance and clinched his first match point on Mannarino's serve with another in a series of backhand winners.
A finalist in his last 10 appearances at his hometown event in Basel, Federer will play either David Goffin of Belgium or Jack Sock of the United States in the semifinals on Saturday.
Marin Cilic and Juan Martin del Potro, both former U.S. Open winners, will face each other in the other semifinal after also being pushed to three-set wins.
Second-seeded Cilic was on court for more than three hours to beat 100th-ranked qualifier Marton Fucsovics of Hungary 7-6 (3), 5-7, 7-6 (4).
Cilic, the defending champion at Basel, clinched the quarterfinal with a delicate sliced backhand volley for a winner.
Fourth-seeded Del Potro needed exactly two hours to win 6-2, 2-6, 6-4 against sixth-seeded Roberto Bautista Agut of Spain.
Del Potro, who won back-to-back Basel titles in 2012 and '13 beating Federer in the final, will qualify for the ATP Finals in London if he wins the title on Sunday.