Reigning champion Novak Djokovic overcame several dips in form to beat Alexander Zverev 6-7(6) 6-2 6-4 7-6(6) and book his place in the Australian Open semi-finals.
The Serbian world number one hit back strongly after losing a tight opening set on a tiebreak but trailed in both the third and fourth sets before turning them around.
German sixth seed Zverev will rue allowing Djokovic back from 4-1 down in the third set and he was also up 3-0 in the fourth.
Djokovic again wore tape on his abdominal area, a legacy of the injury picked up in his third-round win over Taylor Fritz. But it did not appear to bother him as he reached his 39th Grand Slam semi-final, where he will face an unlikely opponent in Russian qualifier Aslan Karatsev.
"After the tiebreak I felt like I started moving better, I started serving better and ended up with more aces than him which is a miracle against someone like Sacha," Djokovic, whose route to the semi-finals has been a struggle, said.
"There were lots of nerves out there, emotionally I feel a little drained, it was a great battle, tough luck to Sacha. We pushed ourselves to the limits."
The 23-year-old Zverev began in confident fashion and broke Djokovic's opening service game as the favourite initially struggled to get into his usual silky rhythm.
Zverev failed to convert a set point on Djokovic's serve when leading 5-3 and wavered on his own serve at 5-4 but showed plenty of composure as he edged the opening tiebreaker when Djokovic fended a return long.
While the first set took an hour, Djokovic needed only 29 minutes to grab the second as Zverev lapsed.
An unpredictable match them took another change of direction as Djokovic went off the boil and Zverev moved into a 4-1 lead, with the Serb's frustration boiling over as he destroyed a racket, leaving fragments of frame across the baseline.
Zverev was 0-30 ahead on Djokovic's serve in the next game but Djokovic clicked back into gear, reeling off 20 of the next 24 points to move one set from victory.
Again Zverev forged ahead in the fourth set and he had three points to move into a 4-0 lead but Djokovic hung on.
Djokovic, bidding for a record-extending ninth Australian Open title, chiselled his way back into a high-quality set, saving yet another break point at 3-4.
Zverev was happy to trade from the baseline in long exchanges and a sumptuous backhand winner earned him a set point in the 12th game, only for Djokovic to reply with an ace.
Djokovic squandered his first match point in the tiebreak with a sliced backhand into the net but a dipping backhand earned him a second opportunity, this time on his own serve, and his 23rd ace sealed victory.
With 114th-ranked Karatsev up next, it would be a huge surprise if Djokovic is not contesting Sunday's final. But he said he will not be taking the Russian lightly.
"To be honest I hadn't seen him play before this Australian Open but now I've seen him," he said.
"He's a very strong guy, physical, moves well and has a lot of firepower from the back of the court. He has a great backhand, serves well and has nothing to lose."
Karatsev continued his stunning run into the semi-finals, beating an ailing Grigor Dimitrov 2-6 6-4 6-1 6-2 to become the first man in the open era to reach the last four in his maiden Grand Slam.
The world number 114 was also only the fifth qualifier to reach the last four of a men's major in the open era and the lowest-ranked player to reach a Grand Slam semi-final for two decades.
The Russian, whose success at getting into the Australian Open came on his 10th attempt to qualify for a Grand Slam, will meet eight-times champion Djokovic for a place in the final.
"It's an unbelievable feeling, first time main draw, first time semis," said the 27-year-old, whose victory was marked only by canned applause with fans still banned from Melbourne Park because of a five-day coronavirus lockdown.
Karatsev confessed to battling with nerves at the start of the contest on Rod Laver Arena and his error-prone first set was indeed forgettable.
He had battled back from two sets down to beat Felix Auger-Aliassime in the fourth round, however, and soon tightened up his game to storm back into the match in the second stanza.
Dimitrov looked shell-shocked as Karatsev pounded howitzer shots over the net at him -- faltering on serve and wandering around the court listlessly in the 30 degree Celsius heat.
The 29-year-old Bulgarian took a medical timeout for treatment on his back after losing the third set but was only able to show flashes of his refined game in the fourth and at one point apologised to his box.
Karatsev showed no mercy to his hampered opponent and broke the 18th seed twice to take a comfortable lead, sealing his place in the last four when Dimitrov flapped a backhand into the net.
At 114 in the world, Karatsev is the lowest-ranked man to reach the semi-finals at a slam since Goran Ivanisevic won Wimbledon in 2001 while he is only the second qualifier to make the semi-finals in Melbourne after Bob Giltinan in 1977.
His scalps have included Diego Schwartzman, Felix Auger-Aliassime and now Dimitrov and, with both his potential semi-final opponents Novak Djokovic and Alexander Zverev also dealing with injuries, it is not impossible he could go further.
"I try not to think about (that)," he said with a smile. "I try to play every match, going from match to match."
Dimitrov was left to rue another missed opportunity at a slam having reached the last eight without dropping a set.
He said of his back spasm: "It started yesterday out of the blue. It was just a regular movement. Just super unlucky.
"I felt great over all the past days. I felt I was on a good path. We've done great work. I couldn’t put my socks on before the match, so I knew it was going to be a tough moment for me. I tried, but it was not good enough.
There were few signs of any problems during the first set but the momentum shifted during the second and Dimitrov became increasingly affected. He took a medical time-out at the end of the third set but there was little that could be done.
Asked why he did not retire, the Bulgarian said: "I don’t like quitting. I’m definitely causing more harm on myself and I think on my team, but you get stubborn. You’re a competitor.
"When you’re on the court sometimes you don’t think straight and, in that particular moment today, I just didn’t want to give up. I couldn’t give up."
Dimitrov was keen to stress the focus should be on Karatsev, saying: "That was his day today. Yes, I struggled – that’s fine. I’m admitting it, I’m taking it in. But please, give the credit for him today."
With his ATP Cup team mates Daniil Medvedev and Andrey Rublev facing off in a quarter-final on Wednesday, Russia are guaranteed to have two players in the semi-finals and could yet provide both finalists.
"I try not to think about it, I just look at the next match," said Karatsev when asked about the prospect.