Stan Wawrinka in action during Swiss Indoors. Photograph:( Reuters )
Wawrinka's last win over his countryman was at the French Open quarter-finals in 2015, since when Federer has beaten him seven times in a row.
Stan Wawrinka outlasted Frances Tiafoe over three sets to set up an all-home quarter-final against compatriot and fellow veteran Roger Federer at the Swiss Indoors on Thursday.
The 34-year-old Wawrinka, who won 6-3 3-6 7-5, will attempt to beat Federer for only the fourth time when they meet for their 27th clash on Friday in a dream tie for the Basel crowd.
Wawrinka's last win over his countryman was at the French Open quarter-finals in 2015, since when Federer, four years his senior, has beaten him seven times in a row.
Earlier, third seed Stefanos Tsitsipas avoided an upset defeat against Ricardas Berankis when he came from a set down.
The Lithuanian, ranked 70th, won the first set in a tiebreak before Tsitsipas took control of his service games to secure the remaining two sets comfortably for a 6-7(4) 6-2 6-4 win.
Sixth-ranked Tsitsipas faced one breakpoint in the match and won 75 per cent of his second-serve points on the way to his 13th quarter-final of the season.
The 21-year-old has recovered well from a poor patch of form in August, reaching the China Open final and the Shanghai Masters semi-finals.