Andy Murray battled past Croatian Ivo Karlovic in the third round of the Pacific Life Open in Indian Wells.
Murray will hope to repeat last year's win over Haas in the quarters
The first two sets went to tie-breaks before the British number one took the third to win 7-6 (9-7) 6-7 (3-7) 6-3.
Eleventh seed Murray broke Karlovic at 4-3 in the final set and served out to secure the victory.
The Scot goes on to the last 16 where he will face Tommy Haas - the man he beat in last year's quarter-finals - at approximately 2100 GMT on Wednesday.
"Haas is just coming back from shoulder surgery and he's started playing well again this week," said Murray.
"It will be a difficult match but one which if I play well I have a good chance of winning."
Should the Scot win that match, world number one Roger Federer is a potential quarter-final opponent this time around.
I was not focusing as well as I should have been
And he will hope to be in calmer frame of mind for his next match, having frequently lost his temper against Karlovic.
"I was disappointed with my attitude during the Karlovic match, I was getting really angry and I haven't done that this year," said Murray.
"I was just in a bad frame of mind and you can sometimes snap out of it, but when you're playing someone who is as frustrating to play against as him, it's difficult.
"I was just happy with the way I came through in the end because I was not focusing as well as I should have been."
Murray took his chances well against the 6ft 10in Karlovic, converting four of his five break-point opportunities.
That came despite a sloppy start which saw the 20-year-old drop serve in game three.
He got back on level terms in game six before edging the tie-break on his third set point. The second set followed a similar pattern, with Karlovic racing into a 3-0 lead before Murray pegged him back at 5-5, but this time it was the Croatian who bossed the tie-break.
It came down to a decider and Murray let a 3-0 lead slip, before two stunning forehands gave him a decisive second break in game eight.
"I sense this was actually a more valuable win for Murray than just reaching the fourth round," said 5 Live's David Law.
"He's obviously a perfectionist but in berating himself for his failings, things just seemed to get worse.
"The fact that he realises that now is surely a positive and if he can keep his temper against Haas, a quarter-final against Federer is surely a possibility."
Earlier, Jamie Murray and partner Max Mirnyi reached the doubles quarter-finals with a 7-6 (7-4) 6-4 victory over Wimbledon champions Arnaud Clement and Michael Llodra.
They will face top seeds Bob and Mike Bryan in the next round.