Rafael Nadal suffered a shock 7-5, 6-3 defeat by Austrian Dominic Thiem in the Madrid Open quarter-finals on Friday, a result that means the Spaniard will lose the world number one ranking.
Thiem, who lost to Nadal in the Monte Carlo quarter-finals last month, was the last player to beat the Spaniard on clay - at last year's Rome Masters.
Nadal had set a record of winning 50 consecutive sets on a single surface by beating Argentine Diego Schwartzman on Thursday.
Nadal's exit means Roger Federer will reclaim the number one spot when the revised ATP rankings are released on Monday.
Thiem stuck to the baseline and took his groundstrokes early to unsettle Nadal, who was unusually below par in the opening set on his favourite surface, making several unforced errors.
Although the 24-year-old Austrian failed to convert a set point in the ninth game, he pounced at the second time of asking to seal the first set with an ace.
A couple of mistimed forehands from Nadal handed Thiem an early 3-1 advantage in the second set but the defending champion fought back to draw level after six games.
But Thiem was not to be denied and won 10 of the next 11 points to snuff out any chance of a Nadal comeback, sealing victory with a powerful cross-court winner in under two hours.
"I haven't been good enough today," Nadal told reporters. "He was better than me today. That's the end of the story.
"Some days you don't play as good as you would like to play. Also when that happens it's because your opponent is doing really well."
The result means that fifth-seed Thiem becomes only the third player - after Argentine Gaston Gaudio and Serb Novak Djokovic - to beat Nadal on clay on three occasions.
"I had to really increase my level compared to Monte Carlo to beat Rafa here," Thiem said.
"He won 21 matches on clay and 50 sets. So I had to play an extraordinary match, and that's what I did.
"I think a very important thing also was today that I went in with the attitude that I can beat him."
Despite the defeat, Nadal will still be favourite to win the French Open for a record-extending 11th time next month.
In the semi-finals on Saturday, Thiem faces big-serving South African Kevin Anderson, who has beaten the Austrian in their last six encounters.
Sixth seed Anderson, who was runner-up at last year's US Open, beat Serb Dusan Lajovic 7-6(3), 3-6, 6-3 earlier on Friday.
British number one Kyle Edmund's Madrid adventure ended with a 7-5, 6-7(6), 6-4 loss to Canadian teenager Denis Shapovalov, who will face Alexander Zverev in Saturday's other semi-final after the German overcame American John Isner 6-4, 7-5.
Edmund knocked out former world number one Novak Djokovic in the second round and 10th-ranked David Goffin in the last 16 but finally succumbed to 19-year-old Shapovalov after saving a match point in the second as he went on to level the match.
Zverev only surrendered six service points against Isner and won 30 when facing serve, taking advantage of the American's physical struggles as the match progressed.