Andy Murray came through strongly at the end of two tight sets to beat Croat Marin Cilic 7-5 7-6 and progress to the quarter-finals of the Madrid Masters.
The Scot trailed for most of the first set but saved three set points at 4-5 and broke Cilic again to wrap it up.
The second set went with serve until Murray broke Cilic, the world number 24, to go 5-3 up, only to drop his own serve when aiming to finish the match.
Murray won the tie-break 7-2 and will play Gael Monfils in the last eight.
The Frenchman, who Murray has played twice before - winning one and losing one of their two encounters on clay in 2006 - overcame American Andy Roddick 6-4 3-6 6-3.
Murray confessed to becoming a little confused during his first full competitive match, after his second-round opponent Simone Bolelli retired, following a three-week break.
"I didn't know what the score was [in the second set]," he said.
"I didn't know I was serving for the set and I asked the umpire if that was actually the score - that hasn't happened to me on the tour before.
"Marin's a tough guy to play against because he hits the ball flat and has a big serve, so I just had to try and stay focused.
"When you trade groundstrokes with him he is very, very good but he started to make a few mistakes as the match went on."
The Scot took his time to get warmed up, a pair of double faults handing Cilic an early break at 2-1 and the Croat, heralded as a future top-10 player, kept Murray at bay with some rasping serves and fierce groundstrokes.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.