Marat Safin ended Roger Federer's 26-match winning streak to reach the final of the Australian Open.
The Russian fourth seed, celebrating his 25th birthday on Thursday, overcame the defending champion 5-7 6-4 5-7 7-6 (8-6) 9-7 in four hours 28 minutes.
Federer never found his best form and received treatment for elbow and back pain at the start of the deciding set.
He battled back from 5-2 down in the fifth and saved six match points, but Safin won it on the seventh.
"It doesn't matter how many match points you have, you have to really win it," said Safin, who was runner up in the last two years of the event.
"It's like a brain fight against each other. It's Roger Federer, so already psychologically it's really difficult. He puts you under pressure, no matter how many match points you have.
"I have lost to him seven times and he's just so good. It's a little difficult to explain what I am feeling right now."
Federer was typically generous in defeat.
"He was the better player - I'm hoping for a rematch but I am thrilled to be a part of it," he said.
"It is really unfortunate. I thought I played really well and a point here and there changed the match. That was a pity but at least I gave it a fight.
"And my back was fine, just a nerve which went to my finger."
Federer had looked on course to retain his title when he won the first set with just one break of serve.
But some uncharacteristic errors saw Safin take the second - the first Federer had lost in the tournament.
The Swiss had one match point of his own at 6-5 in the fourth-set tie-break but Safin produced a superb lob that the world number one could not return.
And Federer then saved two match points at 3-5 in the deciding set, another at 4-5 and recovered from 15-40 down at 6-7.
It was a similar story at 7-8 and, although Federer hit his 22nd ace to save the first, Safin manoeuvred his opponent out wide on the forehand and came to the net to fire a forehand winner into the empty court.
Safin will play the winner of Friday's second semi-final, between second seed Andy Roddick and third seed Lleyton Hewitt, in Sunday's final.