Defending champion Roger Federer overcame a second-set stumble and saved two match points before defeating Benoit Paire to reach the Gerry Weber Open quarter-finals.

The world number one, needing to retain this title to keep his place in the rankings, was worked hard but emerged a 6-3 3-6 7-6 (9-7) winner to remain unbeaten since his return to action for the grass-court season.

Paire matched Federer comfortably early on, but his frustration was evident when he missed an opportunity to break into the lead, allowing the top seed to take control.

If the Frenchman had gifted his opponent the advantage, he ensured the remainder of the match was less straightforward, yet Federer's resolve told and a 10th title in Halle is still on the cards.

Following a steady start, Federer was forced to save the first break point after he failed to make contact with a volley from Paire's measured lob.

But the Swiss ruthlessly closed that opening and then edged in front, profiting as Paire found the net and then smashed his racquet into the grass as his rage built.

Federer took the set and was straight onto the front foot in the second, but he squandered a couple of early break points and Paire made a gain of his own in a dominant next game.

The top seed was now labouring through his service games and was broken again with ease, preventing a bagel with a swift momentum-slowing response but unable to wrest back the set.

It seemed as though Federer might find a second wind, as is so often the case, yet two match points were passed up en route to a tie-break.

Mini-breaks were soon traded under a closing roof until finally, after rescuing a pair of match points, Federer closed out victory when Paire sent a return long.