Rafael Nadal's 11-year, 41-match winning streak at the Barcelona Open was ended with a quarter-final defeat by fellow Spaniard Nicolas Almagro
The world number one had eased through the first set but, after losing the second on a tie-break, was broken twice in the decider.
Almagro took his second match point to seal a 2-6 7-6 (7-5) 6-4 win.
Nadal's only previous Barcelona defeat came in 2003 and he has since claimed eight titles on the Catalan clay.
After that loss to Alex Corretja on his tournament debut, Nadal had lost only two sets in his winning streak.
He had also previously won all 10 matches against world number 20 Almagro, who had managed to take only one set off his compatriot in that time.
Nadal, who was beaten in the quarter-finals in Monte Carlo by David Ferrer last week, was broken in the seventh game of the decider, but hit back immediately to level the match.
However, with the 13-time Grand Slam winner's serve faltering, Almagro broke again to regain a lead he would not surrender.
"I had a lot of chances in the second set when I had the match more controlled but I didn't take them," said Nadal.
"As the match went on I was less calm but I still had openings in the third set at 3-1 and at 4-4 which I didn't take.
"This is tennis and you just have to keep going."
Nadal will aim to stretch his record of French Open successes to nine titles when the second major of the year begins at Roland Garros on 25 May.