triumph over Spanish compatriot David Ferrer.
Second seed Roger Federer also made the semi-finals by overcoming big-hitting Pole Jerzy Janowicz 6-4, 7-6 (7/2) to set up a clash with French upstart Benoit Paire
Berdych, who had beaten top-seeded Djokovic only once in their last 14 meetings, prevailed 2-6, 7-5, 6-4 to book himself an unlikely place in the semi-finals against Nadal and boost his chances ahead of the French Open which gets underway on May 26.
"I lost this match by myself," admitted Djokovic, who had led by a set and 5-2 and had suffered a second round loss to Grigor Dimitrov at last week's Madrid Masters.
"I just lost a bit of concentration. I started playing more defensively.
"The match turned around, he gained confidence and I had a few unforced errors.
"At this level you have to take the opportunities when they come to you."
Defending champion Nadal came through a tough quarter-final against Ferrer prevailing 6-4, 4-6, 6-2 in a 2hr 46min slug-fest.
It was Nadal's second win over Ferrer inside a fortnight after his quarter-final victory on his way to the Madrid Masters title last week.
"I played a great match against a difficult opponent... so this victory for me is very special," said Nadal.
After his feat, Berdych said he put his past record against Djokovic to the back of his mind.
"I had the same motivation as in any other match so there was no question about looking for motivation," said Berdych.
"Even if the record with him wasn't good, one day you have to break it.
"Every streak has to finish some time, and I'm happy that it was today."
Nadal came into this year's tournament seeded only fifth having missed seven months of action because of a knee injury.
However, he has been in great form since his return in February, winning five titles and reaching seven finals.
French surprise package Benoit Paire reached his first Masters semi-final with a 6-1, 6-0 win over Spaniard Marcel Granollers.
Meanwhile, Sharapova said the thought of not recovering in time to defend her French Open title had prompted her to pull out of the Rome Open before her quarter-final.
Sharapova, a two-time winner and the world number two, had been due to play Italy's Sara Errani, who she defeated in last year's French Open final.
However, the Russian announced her withdrawal on Friday morning, citing sickness and claiming she had run a temperature overnight.
"I've a lot on my schedule and they all mean a lot for me and obviously with the French Open coming up it is important to make smart decisions," said Sharapova, who was runner-up to Serena Williams in Madrid last weekend.
Asked whether the fact that it was her boyfriend's (Grigor Dimitrov) birthday on Thursday was a factor, she replied: "Is that a question or a comment? I don't think that has anything to do with it."
Top seed Williams, meanwhile, sailed through to her semi-final with a 6-2, 6-0 win over Spain's Carla Suarez Navarro.
It was the American's 22nd successive win this year.
Williams said she could understand Sharapova's decision to withdraw.
"It's definitely taking a chance and sometimes you might feel like preparing well for the Roland Garros, which is probably the most difficult Slam to win, and you want to give yourself the best chance and sometimes this is what you have to do."
Errani, the world number six, will now go through to the semi-finals to meet Victoria Azarenka of Belarus.
Romanian qualifier Simona Halep reached her first major semi-final, saving two match points on her way to beating Jelena Jankovic 4-6, 6-0, 7-5.
Williams awaits Halep in the semi-finals.