Novak Djokovic’s comeback from injury was cut short at the Monte Carlo Masters as Belgium’s David Goffin earned the biggest win of his career.
World number two Djokovic, playing his second match following an elbow injury, lost 6-2 3-6 7-5 in the quarter-final.
Goffin, who will meet Rafael Nadal or Diego Schwartzman in the semis, had not previously beaten a top-three player.
Meanwhile, Britain’s Andy Murray will play in Barcelona next week following his early exit in Monte Carlo.
Goffin, ranked 13th in the world, earned his first career win over Djokovic by taking his fifth match point in a dramatic 11-minute final game.
It ended the Serb’s hopes of a third title in Monte Carlo, which is an ATP World Tour 1000 event and considered a key part of preparations for the French Open in May.
The 12-time Grand Slam champion looked in trouble after losing the first set and then suffering a heavy fall early in the second.
But he showed no serious damage after falling into the courtside advertising hoardings, improving to break Goffin’s serve in game four as he went on to level.
Goffin, 26, lost his serve in the opening game of the decider, only to fight back and level at 4-4 by taking his seventh break point of the set.
The pair traded holds in the next three games before nerves appeared to affect Goffin as he squandered four match points in what proved to be the final game.
But he refocused to win at the fifth attempt when Djokovic, who had been given a time violation moments earlier, hit a forehand into the net.
It was Goffin’s first win in six meetings with Djokovic and his first victory in 15 matches against a player ranked in the top three.
Earlier, Spanish clay-court specialist Albert Ramos-Vinolas followed up his victory over Murray with a 6-2 6-7 (5-7) 6-2 victory against Croatian fifth seed Marin Cilic.
He will play France’s Lucas Pouille, who beat Uruguay’s Pablo Cuevas 6-0 3-6 7-5, in Saturday’s other semi-final.