Britain's Andy Murray reached the quarter-finals of the ABN Amro World Tennis Tournament with a 6-4 3-6 6-3 win over Dominic Thiem in Rotterdam.
The world number six broke 20-year-old Thiem, ranked 113 in the world, in the first and third games but gave up his own serve before winning the first set.
Murray was broken again in game eight of the second set, and Austrian Thiem held his serve to level the match.
But Murray picked up a vital break in the decider and next faces Marin Cilic.
Croatian Cilic broke number five seed Jo Wilfried Tsonga once in each set as he won his second-round match 6-4 6-4.
Murray, who has slipped down the world rankings following back surgery, accepted a late wildcard to play in Rotterdam.
But he struggled to keep pace with Thiem, who adopted a carefree, hit-everything approach that served him well for much of the match.
A clearly frustrated Murray smashed his racquet into his shoe at one point, before getting the break of serve in the third set.
The Wimbledon champion is looking to repeat his 2009 success on the indoor hard surface in Rotterdam, when he beat Rafael Nadal in the final.
Elsewhere, defending champion Juan Martin Del Potro of Argentina eased into the last eight with a 6-2 7-6 (7-2) victory over France's Paul-Henri Mathieu
Del Potro will play Ernests Gulbis after the Latvian beat Bulgarian Grigor Dimitrov 6-4 7-6 (7-3).
Number three seed Tomas Berdych will take on Poland's Jerzy Janowicz after both enjoyed straight-sets wins.
Czech Berdych defeated Nicolas Mahut 6-4 6-3, while Janowicz saw off the challenge of sixth seed Tommy Haas 6-4 6-4.
Dutchman Igor Sijsling took just 55 minutes to thrash Michael Berrer of Germany 6-1 6-2 to set up a last-eight tie against Philipp Kohlschreiber, who beat Richard Gasquet 7-5 7-5.