(CNN) -- Rafael Nadal is the undisputed "King of Clay" but the Spaniard only just managed to cling onto his crown at the Rome Masters.
The defending champion was blown away 6-1 in the opening set of his third round match by Latvia's Ernests Gulbis as the prospect of a shock defeat began to surface.
But the seven-time French Open winner hit back to take the next two sets 7-5 6-4 and set up a last eight contest with fellow Spaniard David Ferrer.
Nadal, who is aiming for a seventh title in Rome, has been in impressive form since returning from a seven-month absence with a knee injury.
The World No.5, who won his 23rd Masters tournament in Madrid last week, has triumphed in five of his seven finals since working himself back to fitness.
"On Friday, I have a chance against against a very difficult player," Nadal told a press conference ahead of his clash with Ferrer.
"I survived a tough match today. Now I have another chance to try and go further.
"Being in the quarterfinals is fantastic. I'm more than pleased with what I've done since I returned (from his seven months off with knee problems)."
Ferrer will be fresh and raring to go after his opponent, Germany's Philipp Kohlschreiber, withdrew after suffering with vertigo.
Meanwhile, top seed and World No.1 Novak Djokovic eased to a 6-1 6-4 win over Alexandr Dolgopolov.
The Serb star, who had been suffering with an ankle injury before winning in Monte Carlo last month, showed no signs of discomfort as he prevailed in just an hour.
Roger Federer also cruised into the quarterfinals following a 6-1 6-2 victory over Frenchman Gilles Simon.
Federer, seeded second, will take on Poland's Jerzy Janowicz for a place in the last four.
In the women's section, Serena Williams thrashed Slovakia's 14th seed Dominika Cibulkova 6-0 6-1 to make it 21 consecutive victories.
The World No.1 will face Spain's Carla Suarez Navarro in the semifinal, but says she is taking nothing for granted after her shock defeat in the opening round at Roland Garros last year.
"Nothing is ever perfect -- I learned that last year when I felt perfect," she told a press conference. "I am still in the danger zone."
"I can't remember the other winning streaks, but I hope I can get to 22 and the rest of the matches that I have here.
"Plus seven, and Wimbledon too, so it would be dangerous to lose now."
Fifth seed Li Na, who won at Roland Garros in 2011, suffered a shock defeat against Jelena Jankovic.
Li was beaten 7-6 7-5 and was unhappy with her performance.
"I felt like I wasn't playing so badly today, it was just a really long, tough match between me and JJ," Li told reporters.
"I was trying a lot of things out there on the court today. Sometimes it was working, sometimes it didn't."