Top seed and six-time champion Roger Federer stayed perfect against Philipp Kohlschreiber on Thursday, handing the German his 11th FedEx ATP Head2Head defeat in as many tries 6-4, 4-6, 6-4 to reach the Swiss Indoors Basel quarter-finals.

The World No. 3 now leads Kohlschreiber 24-3 in sets during their decade-long rivalry, and the 32-year-old German has now lost his past 15 matches against Top-10 opponents.

"It was extremely difficult, especially midway through the second and the beginning of the third," said Federer. "It was a tough set and a half for me. I wasn't struggling, but I wasn't quite feeling it."

Federer notched a break of serve in the fifth game to distance himself in the opening set, one in which he would tally 12 winners to five unforced errors.

With Federer serving to stay in the second set down 4-5, 30-40, Kohlschreiber would level the match at one set apiece with a break when Federer dumped a backhand into the net.

It was the ninth game of the third set that Federer would get his second and final break, and the 17-time Grand Slam champion would then step up to serve out the match. He would finish with 13 aces, winning 87 per cent (42 of 48) of his first-serve points.

"The spectators tonight maybe gave me that last push I needed, giving me energy and carrying me over the finish line," said Federer of the home crowd.

The 34-year-old will next face Belgian David Goffin in a rematch of the 2014 Basel final, which Federer won 6-2, 6-2. Goffin advanced on Thursday with a 6-4, 6-4 win over Frenchman Adrian Mannarino.

Federer improved to 55-9 on the season, including nine finals, second only to World No. 1 Novak Djokovic (13). He is now 58-9 lifetime in Basel. The last time he failed to reach the Swiss Indoors final was in 2003, when he fell to Ivan Ljubicic in the second round. He did not play in Basel in 2004-05, but he’s reached the final every year since 2006, when he won the title for the first time (d. Fernando Gonzalez). He began with a 14-6 record in Basel, but over the past nine years is 44-3.