(CNN) -- Rafael Nadal's "King of Clay" crown may have slipped a little this year, but the world No. 1 is not giving up his reign without a fight.
Having suffered shock quarterfinal defeats in his former strongholds of Monte Carlo and Barcelona, the Spanish tennis star rallied to retain his Madrid title -- and on Friday he battled back from the brink of defeat in Rome to reach the semifinals.
Two-time defending champion Nadal overcame Andy Murray in three sets, having been thrashed in the opener and then trailed 4-2 in the decider before prevailing 1-6 3-6 7-5 in two hours and 40 minutes.
As a measure of his recent struggles, it was the first time since 2005 that Nadal had been taken the distance in three consecutive matches on his favorite surface at the same tournament.
Murray, seeking to regain the form that took him to second in the rankings, had been poised for his first win over Nadal on clay but the seventh-seeded Brit ultimately failed to press home his advantage.
Nadal, seeking his eighth title in the Italian capital, will next face Grigor Dmitrov on Saturday.
The 14th-ranked Bulgarian celebrated his 23rd birthday with easy passage against German veteran Tommy Haas, who retired with a shoulder injury after losing the first set 6-2.
"I'm just a happy birthday birth today," said Dimitrov, who received a cake in the face after the match courtesy of his coach.
World No. 2 Novak Djokovic also battled into the semifinals, beating Nadal's Monte Carlo conqueror David Ferrer 7-5 4-6 6-3 in two hours 32 minutes.
"It was the most physical match I had on clay this year," said the Serbian, who will next play Canada's Milos Raonic.
The eighth seed was also taken to three sets by Frenchman Jeremy Chardy -- who upset Roger Federer on Wednesday -- before triumphing 6-3 5-7 6-2.
In the women's draw, world No. 1 Serena Williams set up a semifinal with former top-ranked Serbian Ana Ivanovic.
The American defending champion defeated China's Shuai Zhang 6-1 6-3, while 11th seed Ivanovic followed up her win over two-time Rome winner Maria Sharapova by beating Spain's Carla Suarez Navarro 6-4 3-6 6-4.
Ivanovic's only win over 17-time grand slam champion Williams came at January's Australian Open, but the 2008 French Open winner then lost to young Canadian Eugenie Bouchard in the quarterfinals.
World No. 2 Li Na suffered a 6-3 4-6 6-2 loss against Italy's 2012 French Open runner-up Sara Errani, who will next play Jelena Jankovic in her home event.
Ivanovic's compatriot, also a former No. 1, upset Polish third seed Agnieszka Radwanska 6-4 6-4 to give herself a chance of reaching the final for the third time.
Jankovic, still seeking her first grand slam title, was Rome champion in 2007-08 and losing finalist in 2010.