HALLE, Germany (AP) — Roger Federer advanced to the semifinals of the Gerry Weber Open for the 13th time by beating defending champion Florian Mayer 6-3, 6-4 Friday.

Federer, an eight-time champion in Halle, had 11 aces, saved both break points he faced and converted two of his own to maintain his bid for a 16th grass-court title.

"I thought I was very calm out there, even in difficult moments," said Federer, who only returned to action last week in Stuttgart after a two-month break. "I was calm serving out the first and second sets. Those are always signs for me that things are slowly starting to fall into place nicely."

Federer, who lost to German veteran Tommy Haas in Stuttgart, has not dropped a set in three matches this week while improving his record in Halle to 57-6.

He will next face Karen Khachanov, who defeated Andrey Rublev 7-6 (8), 4-6, 6-3.

"I don't know him that well yet so it's a match where I'll most likely focus on my own game," Federer said of facing the Russian in the semifinals.

Fourth-seeded Alexander Zverev will face Richard Gasquet in the other semifinal match. Zverev defeated Roberto Bautista Agut 6-7 (6), 7-6 (1), 6-1, while Gasquet beat Robin Haase 6-1, 3-6, 6-1.