What looked a routine win for Andy Murray turned into a bit of a struggle before he finally saw off French lucky loser Stephane Robert to reach the quarter-finals of the Australian Open.
Murray missed four match points in the third set but ensured there was no miracle comeback for Robert by wrapping up a 6-1 6-2 6-7 (6/8) 6-2 victory on his sixth chance.
Much greater tests await with either Roger Federer or Jo-Wilfried Tsonga waiting in the last eight.
Murray said of Robert: "He's a fun player to watch but not fun to play. He plays all the shots, he's very unorthodox. He made it very tough for me.
"If you can, you want to close matches out when you have the opportunity. I had chances on my serve, I didn't get them. I tried to stay focused at the beginning of the fourth, got an early break and that helped."
For two sets it was virtually a stroll in the park for the Wimbledon champion.
Of all the possible opponents he could have faced in the fourth round, Robert was among the most unlikely.
The 119th-ranked Frenchman initially lost in the final round of qualifying but secured a lucky loser spot 10 minutes before meeting Aljaz Bedene after Philipp Kohlschreiber pulled out.
Robert won that one and two more to become the first lucky loser ever to reach the fourth round at Melbourne Park.
But from 1-1 he lost nine straight games, with Murray ending the first set on a run of 11 straight points.
Robert had never previously been beyond the second round of a grand slam, with his greatest moment prior to this tournament coming when he beat Tomas Berdych at the French Open in 2011.
Murray's purple patch continued until Robert held for 1-4 and, although the Scot had no trouble clinching the set, there were signs things were about to get tougher.
He served double faults on his first two set points, betraying nerves that were perhaps attributable to this being only his sixth competitive match since back surgery.
The start of the third was certainly much closer but Murray looked like he had done the hard work when he forged ahead to lead 4-3, overcoming frustration to take his seventh break point.
That was emphatically not how it turned out, however.
Murray brought up two match points at 5-4 but missed both, the first with a double fault, and, on his sixth break point, Robert secured his first break of the match.
The engaging Frenchman deserved his reprieve, and he made a flying start to the tie-break by winning two points on Murray's serve to lead 3-0.
The Scot pegged him back and had two more match points but a poor second serve and a missed forehand accounted for those, too.
Murray then netted a forehand to give Robert his first set point and a long forehand handed it to the Frenchman, Murray taking his frustration out by breaking his racquet.
Murray's first dropped set of the tournament appeared more of an inconvenience than anything more threatening, but he still needed a good start to the fourth.
And he got it with a break to love to lead 3-1, Robert rather handing it to him by double-faulting for the sixth time.
The 33-year-old had already called the trainer to have his thigh massaged, and it was an awfully long way back for him.
Murray thought he had taken his fifth match point when Robert's shot was called wide but it was correctly over-ruled.
A sixth arrived straight after, though, and this time he clinched it when the Frenchman netted a forehand.
It took two hours and 21 minutes but Murray was finally though to his 12th grand slam quarter-final in a row at tournaments he has contested.
Robert stayed on court to soak up some deserved applause as a relieved Murray celebrated surviving his first hiccup.