Rafael Nadal's comeback halted by Jordan Thompson in epic encounter in Brisbane
Thompson saved three match points in the second set before overcoming an increasingly fatigued Nadal 5-7, 7-6(6), 6-4 in a gruelling encounter that finished just before midnight on Pat Rafter Arena.
Playing his first tournament after almost 12 months away from the sport through injury, Nadal appeared headed for a straight sets win after claiming the first set and then getting to a 6-4 lead in the second set tiebreak.
But an inspired Thompson refused to go away and took advantage of some unforced errors from the Spaniard to clinch the second set.
Nadal, who was broken early in the third set, took a medical time out at 1-4 down after appearing to need treatment to his upper left thigh.
He was able to continue but was unable to break back and Thompson held on to the delight of the capacity crowd.
"I completely forgot I saved match points," Thompson said immediately afterwards.
"To beat Rafa in Brisbane in a quarter-final, and I think it is now my first semi-final on a hard court, I couldn't be happier."
Thompson will now play second seed Grigor Dimitrov in the semi-finals after the Bulgarian's 6-1, 6-4 victory over Australian Rinky Hijikata.
The second semi-final sees top seeded Dane Holger Rune up against Russian Roman Safiullin.
Rune looked in great touch as he downed Australian qualifier James Duckworth 6-2, 7-6(6), while unseeded Safiullin beat Italy's Matteo Arnaldi 7-6(4), 6-2.
Nadal had gone into his quarter-final against Thompson in superb touch following relatively easy wins in his opening two rounds.
But Thompson, the world number 55, ensured that the Spaniard wouldn't have it all his own way, returning well throughout to constantly pressure Nadal's serve.
Despite losing his serve for the first time this tournament at 3-3 in the opener, Nadal was able to break Thompson twice to clinch a tight first set in 70 minutes.
Thompson threw everything at Nadal in the second set, playing some superb tennis, but the Spaniard was able to somehow absorb the pressure.
It looked like vintage Nadal as he turned the screws in the tiebreak, opening a 3-0 lead.
But Thompson came back to level at 3-3, then saved two match points at 6-4 down, clinching the set in 83 minutes.
Nadal began to look tired at the start of the third set, in contrast to the Australian, and it came as no surprise when he was broken early in the third, with Thompson comfortably holding on.