Eight-time champion Nadal knocked out in Monte Carlo
Rafael Nadal squeezes his eyes shut during his Monte-Carlo ATP Masters match against David Ferrer on April 18, 2014 in Monaco - by Jean Christophe Magnenet
Ferrer, seeded sixth, handed the top seed only his third loss at the tournament a day after Nadal had won his 300th clay match of his career and 50th at the Monte Carlo Country Club.
Ferrer came to the court with a 5-21 deficit against his compatriot, whose form has dropped this season.
He will now face off on Saturday against Australian Open winner Stanislas Wawrinka, who beat Nadal in that grand slam final and booked his place 7-6 (7/5), 6-2 over Canadian Milos Raonic.
Nadal's only other losses at the tournament occurred in the 2003 third round against Guillermo Coria and last year when he went down in straight sets to Novak Djokovic in the final.
Prior to that final, he had won eight straight editions.
Nadal was well off the boil from the start in a contest where the opening set took 75 minutes and the third game required a quarter of an hour.
The top seed ended his quest with a forehand to the net, his 44th unforced error.
Ferrer battled his nerves as he served for victory leading 5-2, but was broken. On his second chance, the 32-year-old got the job done after two hours, 11 minutes.
The win was the first on clay for Ferrer against Nadal in a decade.
Wawrinka, who had a walkover in the previous round when Spain's Nicolas Almagro pulled out with a foot injury, took control as Canadian Raonic twice lost leads in the opening set tie-breaker.
The mistakes gave an opening to Wawrinka, who took the first set on his initial opportunity and then broke to start the second as the frustrated Raonic let go of a 40-15 lead in the first game.
From that point on, momentum totally shifted to the Swiss world number three, who broke the Canadian again for 5-2 before serving out for the match in 90 minutes.
"I showed him on every point that the match will be tough for him," said the winner. "Even in the first set he was staying with me. He was close to winning the tie-break.
"But it was a tough set for him because he had to play his best, he had to always try something.
"I felt strong from the baseline, I feel good physically. I know that on clay courts if I play my best tennis I can beat those guys.
"I know it's never easy, but I'm really happy the way I did today."
Wawrinka finished with 30 winners and 28 unforced errors and never faced a break point. The Swiss was playing his third consecutive quarter-final at the event which marks the start of the European clay season and the run-up to Roland Garros which begins on May 25.
He now stands 3-0 over Raonic, who was playing his first clay court quarter-final at the Masters 1000 level.
Wawrinka duplicated his 2009 result by reaching the semi-finals and improving his season record to 18-3.