Novak Djokovic was given a scare but the world No 1 battled past France's Gilles Simon in a five-set thriller at the Australian Open.
The 10-time Grand Slam champion showed a chink of vulnerability, hitting a mammoth 100 unforced errors, before winning 6-3 6-7 (1-7) 6-4 4-6 6-3 on Rod Laver Arena.
Defending champion Djokovic, who has now lost only once in his last 32 Grand Slam matches, was well below his brilliant best but is safely through and will now meet Japan's Kei Nishikori in the quarter-finals.
The last time Djokovic was taken to a fifth was at Wimbledon last year when he held off Kevin Anderson and he showed his resilience again here to make his 27th consecutive appearance in the last eight of a Grand Slam.
"Playing against a player like Gilles you can expect a lot of rallies," Djokovic said.
"He is always making you play an extra shot. I made a lot of unforced errors today but he was fighting, he was playing well, physically it was very demanding and I'm just happy to get through this one."
As he was finishing his on-court interview, a spectator shouted out "no more dropshots!" after the top seed had netted two drop-shots at crucial moments in the fourth set.
Djokovic halted his interview and asked the fan to repeat his advice before replying over the microphone: "I hate to say it, but you're absolutely right."
The top seed found a brick wall in the form of the 14th seed Simon whose dogged scrambling frustrated the Serb for much of the match which lasted four hours and 32 minutes but booked his 27th successive quarter-final at the majors.
Two breaks were enough in the first set but Djokovic was already showing signs of sluggishness.
After Djokovic had spurned 11 break points, the Frenchman, renowned for his speed and guile but not his attacking instincts, capitalised, storming into a 5-0 lead in the tie-break before clinching the set.
Djokovic reduced his error count in the third by inviting Simon to attack and the tactic worked as he broke twice to restore his advantage.
The 28-year-old from Belgrade wavered, serving to stay in the fourth set at 5-4, dabbing two limp drop-shots into the net and then missing a backhand to send the contest to a decider.
But his composure returned quickly in the decider as he broke Simon early and motored to a 5-1 lead.
Simon rallied with a final flourish, regaining a service break and saving two match points before holding to raise thunderous cheers from a raucous crowd firmly in his corner.
But after raising a third match point with an ace, Djokovic sealed the match with an imperious backhand down the line and after shaking hands with his opponent, was glad to slump into his chair.
Nishikori produced his best tennis of the tournament to breeze past former finalist Jo-Wilfried Tsonga 6-4 6-2 6-4.
Nishikori's service was more effective than Tsonga, winning 74 per cent of the first serve points and sweeping up 64 per cent of the points on his second serve. He hit 31 winners, 16 off his strong forehand to reach his third quarter-final in Melbourne in the past four years.
The Japanese star will now meet reigning champion Djokovic in the last eight and vengeance will be on his mind once again after the Serb thrashed him 6-1 6-1 indoors at the ATP World Tour finals in November.
The world No 7 has beaten Djokovic twice in their previous seven meetings, however, most notably to reach the final at the 2014 US Open.
"We played in London and he kind of destroyed me," he said.
"It wasn't an easy match for me. It's different conditions, but I hope I can make some changes and try to play better.
"Yeah. I'm ready to beat him again."
We will bring you all the news, views, reaction and opinion throughout the Australian Open.