Roger Federer survived two match points against French maverick Gael Monfils to extend his claycourt comeback and reach the quarter-finals of the Madrid Open on Thursday.
He was joined in the last eight by five-times Madrid champion Rafael Nadal and world number one Novak Djokovic.
The evergreen Federer did not drop a game in a dominant first set but was dragged into an intense battle by an inspired Monfils before prevailing 6-0 4-6 7-6(3).
World number three Federer, playing his first tournament on clay for three years as he prepares for the French Open, surrendered the initiative after his brisk start and was in deep trouble in the third set when he trailed 4-1.
Federer struggled with his timing on occasions in breezy, sunny conditions and swatted a ball angrily over the stands when he dropped serve at the start of the decider.
But the 37-year-old Swiss broke back in the seventh game with a stunning sliced backhand return.
Monfils earned a match point at 5-6 on the Federer serve with an ice-cool backhand pass, but Federer followed in a second serve and bounced away a smash.
Federer saved another match point to set up a tiebreak and he proved unstoppable as he swept to his 1,200th match win.
Austrian Dominic Thiem, a beaten finalist in Madrid last year, awaits in the next round after he beat Italian Fabio Fognini.
“I think Gael did a nice job of not being frustrated losing the first set,” Federer said. “I lost five games in a row and it didn’t look good for a while but I hung in. There were some highly stressful moments but I mixed it up nicely.”
Federer’s fellow Swiss Stan Wawrinka, champion at Roland Garros in 2015, continued to produce some vintage form as he beat Japan’s Kei Nishikori 6-3 7-6(3).
World number one Djokovic was untroubled as he beat Jeremy Chardy 6-1 7-6(2) to set up a clash against Marin Cilic after the Croatian battled past Serbian Laslo Djere 4-6 6-3 6-2.
Spaniard Nadal, who later this month will aim for a 12th French Open, swept past unseeded American Frances Tiafoe 6-3 6-4 while defending champion Alexander Zverev defeated Hubert Hurkacz 3-6 6-4 6-4.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)