Andy Murray reached the last eight at the Brisbane International with a 6-1 5-7 6-3 victory over world number 199 John Millman.
Murray raced through the opening set with three breaks of the Millman serve but was broken twice in the second as the 23-year-old, playing in only his fifth tour-level match, fought back to take the match into an unlikely decider.
Murray looked in some pain at times in the third set, but he managed to claim the solitary break required to wrap up victory in two hours and five minutes, and set up a quarter-final meeting with Denis Istomin of Uzbekistan.
Murray told atptour.com: "I think it was a pretty high-quality match. The first set wasn't that comfortable. He gained confidence and started going for his shots more.
"He was returning my first serve extremely well and playing right up on the baseline and just going for big shots. It was tough for me to dictate too many of the points.
"I made some adjustments with the way I was serving in the third set that turned it around, but he played really, really well for the most part."