Dominic Thiem has knocked favourite and 11-time champion Rafael Nadal out of the Barcelona Open with a stunning 6-4, 6-4 victory in their semi-final, avenging his defeat by the Spaniard in last year's French Open final.
The Austrian will meet 23-year-old Daniil Medvedev in the final on Monday (AEST) after the Russian also pulled off a surprise by edging out fourth seed Kei Nishikori 6-4, 3-6, 7-5 in a tight match.
Thiem had lost his last two matches against world No.2 Nadal, at Roland Garros as well as a thrilling five-setter in the US Open quarter-finals, but he won their last meeting on Spanish soil, beating the Mallorcan in last year's Madrid Open.
The Austrian, ranked fifth in the world, broke Nadal to take a 3-2 lead in the opener and held in the next game thanks to a stunning crosscourt forehand winner before seeing out the set.
He broke Nadal again in the fifth game to lead 3-2 and edged towards victory by taking a 30-15 lead before Nadal pulled himself back into contention by winning the next three points.
Thiem was serving for the match but Nadal dug deep to earn three break points only to lose each one, Thiem levelling the game with an ace after a marginal call from the umpire.
He sealed his fourth career victory over Nadal in 12 matches with a softly struck backhand, which the Spaniard had no chance of reaching, ending Nadal's chances of a fourth consecutive Barcelona Open title.
"I'm always super proud if I beat him because he's the best player ever on this surface, and it's always very special to beat him here on clay," Thiem told reporters.
"We always had great matches in the past, and also today was very good and I was more lucky today and I got the win."
Nadal, long regarded as the king of clay, has struggled for form on the surface of late, losing in the semi-finals of the Monte Carlo Masters and having a poor tournament in Barcelona.
He dropped a set for the first time in four years at the event in his opening match against Leonardo Mayer and conceded he has been far from his best.
"This has been a complicated week for me, especially at the start. Today I enjoyed playing tennis again, I lost against a top rival and I was competitive until the end," Nadal said.
"What I needed to do was play more games like this to have a chance of victory. It has been a good base for what is to come. There are some victories which hurt you and others which can help you and this is one of those."
Two-time Barcelona champion Nishikori beat Medvedev in the final of the Brisbane International in January but the Russian took an early advantage by breaking the world No.7 in the seventh game.
Medvedev comfortably saw out the set but was pegged back by the Japanese, who won five games in a row to take the second set and make an ideal start to the decider.
Medvedev, ranked 14th, soon broke back to level the match and as both players consistently held their serve a tiebreak looked inevitable.
But Medvedev earned the first match point with a down-the-line winner and needed only one opportunity, clinching an entertaining match that lasted two hours and 25 minutes when Nishikori found the net with a forehand.
Monday's final will be Medvedev's third of 2019 but his first final on clay.