In the women's event, Sam Stosur continued to her fine form, the ninth-seeded Australian beating No8 Petra Kvitova 7-5, 2-6, 6-1.

Gulbis, ranked 46th, and a winner in Rome in 2010 over Roger Federer on his way to the semifinals, saved two match points in the third set, but finally went down when he sent a forehand wide to the massive relief of a dancing, celebrating Nadal.

The Spaniard now stands 6-0 against Gulbis as he tries for a seventh Rome title.

He will next face compatriot David Ferrer, who advanced in a walkover against Germany's Philipp Kohlschreiber, who was suffering from vertigo.

"On Friday, I have a chance against a very difficult player. I survived a tough match today. Now I have another chance to try and go farther," said Nadal.

"Being in the quarter-finals is fantastic. I'm more than pleased with what I've done since I returned [from his seven months off with knee problems]."

Nadal was fresh from his Madrid title at the weekend - his record 23rd Masters.

He has won five titles from seven finals since returning to tennis after his seven-month injury absence.

Top seed Novak Djokovic played without ankle pain in a routine 6-1, 6-4 defeat of Alexandr Dolgopolov.

Djokovic dispatched Dolgopolov in an hour, with five aces and 13 winners in a contest which began 45 minutes late because of morningrain.

The two-time Rome champion will next play Czech Tomas Berdych, a winner over South Africa's Kevin Anderson 7-5, 6-2.

Djokovic said he had almost forgotten about his ankle injury since winning the title in Monte Carlo over Nadal last month.

"I've been pain-free for a week but I'm still very cautious in my warm-up and recovery. I don't think it will bother me any more and I don't think about it when I'm on the court."

Second seed Federer demolished Gilles Simon 6-1, 6-2 and set up a meeting with Jerzy Janowicz after the Pole knocked out Richard Gasquet, the ninth seed, 3-6, 7-6 (7-2), 6-4.

Federer is looking for his first Rome trophy after playing finals in 2003 and 2006.

In the women's event, world number one Serena Williams comfortably made the quarter-finals with a 6-0, 6-1 mauling of Slovakia's 14th seed, Dominika Cibulkova.

Williams, who has now won 21 successive matches, will face Spain's Carla Suarez Navarro for a spot in the semifinals.

"Nothing is ever perfect - I learned that last year when I felt perfect," said Williams, referring to her stunning first-round loss at Roland Garros in 2012.

"I am still in the danger zone."

Williams added: "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."

Second seed Maria Sharapova, winner of the last two editions, out-hit Sloane Stephens 6-2, 6-1 in just over an hour. Third-seeded Victoria Azarenka also went through when Ayumi Morita retired through injury in the second set.