Rafael Nadal was forced to work hard to avoid becoming the biggest scalp in the last 16 at the Internazionali BNL d’Italia on Thursday.
Rival Novak Djokovic had already sealed his progress earlier in the day, beating Alejandro Davidovich Fokina in dominant fashion, but Nadal found life hard against Denis Shapovalov.
The Spaniard has already uncharacteristically lost twice on clay courts this season and was heading for a third as he trailed Shapovalov 3-6 0-3.
Even after Nadal recovered to take the second set, he faced two match-points in the decider.
He battled bravely to a vital hold of serve that took the match well beyond the three-hour mark and into a tie-break.
There, Nadal finally took control, running out a 3-6 6-4 7-6 (7-3) winner to reach the last eight and gain some much-needed minutes on the court.
“It’s an important victory for me [to] be able to win matches like today, three hours and 27, in the Barcelona final three hours and 38, long matches,” said Nadal.
“To be able to win these kinds of matches against young players gives me confidence with my body.”
There had been no such test for Djokovic in his 6-2 6-1 rout, although the world number one felt that was in part due to his improving form.
“I thought I played better, at least 20 or 30 per cent better, than I did against [Taylor] Fritz a few days ago,” he said. “I am on a good trajectory and hopefully tomorrow will be even better.”
Djokovic will face fifth seed Stefanos Tsitsipas next after his straight-sets defeat of Matteo Berrettini.
For Nadal, Alexander Zverev is a similarly tricky opponent having come through three sets against Kei Nishikori.
But not every seed made it through, as Dominic Thiem succumbed to the last remaining home hopeful in Lorenzo Sonego, a dramatic 6-4 6-7 (5-7) 7-6 (7-5) victor.
A meeting with Andrey Rublev is the Italian’s reward, while there will be at least one unseeded player in the last four as Federico Delbonis prepares to take on Reilly Opelka.