Austrian Thiem was a break up in the opening set but lost it on a tie-break and was pushed all the way in a 6-7 (5/7) 6-3 7-5 victory that took two hours and 39 minutes.
Thiem will next play Britain's Dan Evans, who upset eighth seed Marcel Granollers 1-6 6-3 6-3.

Eurosport Player special offer: 12 months for only £19.99

ATP Sydney
Dan Evans beaten by tearful Muller in Sydney final
14/01/2017 AT 12:28
Two-time defending champion Viktor Troicki extended his winning run in Sydney to 13 matches with a 6-3 6-4 win over Paolo Lorenzi.
The top six seeds are all through to the last eight.
Second seed Pablo Cuevas and fourth seed Pablo Carreno Busta won three-set battles against Nicolas Mahut and Mischa Zverev respectively, and they were joined by Philipp Kohlschreiber and Gilles Muller.
It was the end of the road, though, for 17-year-old Australian Alex De Minaur, who retired through injury after losing the opening set 6-2 to Andrey Kuznetsov.
At the ASB Classic in Auckland, second seed John Isner had to save a match point before seeing off Tunisia's Malek Jaziri 6-3 3-6 7-6 (8/6) in round two.
Isner, the champion in 2010 and 2014, next plays countryman Steve Johnson while fourth seed Jack Sock beat another American, Ryan Harrison, to reach the last eight.
Robin Haase caused the shock of the day by beating third seed and four-time champion David Ferrer 2-6 6-4 7-6 (7/4).
Another former champion, Czech Jiri Vesely, is also through along with eighth seed Marcos Baghdatis and Joao Sousa.
Sixth seed Feliciano Lopez withdrew before his second match against Jeremy Chardy because of a lower back problem.
ATP Sydney
Evans: British success 'really good' ahead of Australian Open
13/01/2017 AT 12:04