Marin Cilic will play Kyle Edmund in the semi-finals of the Australian Open after Rafael Nadal retired during the deciding set of their clash with a hip problem.
The world number one looked to be on his way to yet another grand slam semi-final when he moved two sets to one in front but he called for the trainer after going a break down in the fourth set.
Nadal took a medical time-out but was clearly hampered in his movement and, after limping around the court for two games at the start of the fifth set, he headed to the net to shake hands.
The 3-6 6-3 6-7 (5/7) 6-2 2-0 victory gave Cilic a first victory over Nadal since 2009 and sent him through to his first Australian Open semi-final since defeat by Andy Murray in 2010.
Cilic said: "It was an unbelievable performance from both of us. It's really unfortunate for Rafa. He's an unbelievable competitor, always gives his best.
"When you're wounded, sometimes the balls are going in, so I was really paying attention to the first couple of games. It was absolutely important for me to continue with my intensity."
Cilic and Edmund have played once before, with the Croatian winning in straight sets in Shanghai last October.
"He's had an amazing run," said Cilic. "A few five setters, tough battles, and then a great match today. Big congratulations to him for making the semi-finals. Kyle is also a big hitter, big serve, big forehand, so I have to take care of my side of the court."
Nadal had eased into the fourth round but then had a real battle with diminutive Argentinian Diego Schwartzman lasting nearly four hours.
He knew he would have to be more aggressive against Cilic and for a set he was. All looked rosy for Nadal when he broke to lead 3-2 in the second set but there the matched changed.
Cilic had allowed himself to be dictated to but the Croatian began to unleash his ferocious groundstrokes and earned his reward, breaking the Nadal serve twice in a row and then serving out the second set.
Cilic carried his momentum into the third set and really should have won it but Nadal showed typical powers of resistance before coming through a topsy-turvy tie-break.
The Spaniard celebrated exuberantly but his emotions quickly changed and there was no coming back.