The 37-year-old world number three, an eight-time champion here, survived a late break to win in 64 minutes.

In Sunday’s final he will play world number 93 Marius Copil of Romania, who beat second seed Alexander Zverev of Germany 6-3 6-7 (6-8) 6-4.

In Vienna, Kevin Anderson will play Kei Nishikori in the Erste Bank Open final.

Local hero Federer, who first reached the Basel final in 2000 and took the title for the first time in 2006, has won three tournaments this year, including the Australian Open that marked his 20th Grand Slam singles title.

It was his second win of the year against 20-year-old Medvedev, ranked 20th in the world.

Victory in the final would put Federer on 99 career titles.

Romanian 28-year-old Copil served 26 aces in his victory over world number five Zverev as he reached the second ATP final of his career.