Roberto Bautista-Agut has advanced to the last 16 of the Shanghai Masters after edging past Vasek Pospisil.
The Spaniard beat the unseeded Canadian over a hard-fought three sets and could now face Roger Federer.
The tight nature of the contest was incapsulated in the opener, which went the distance after games were exchanged on serve throughout, but Bautista-Agut dominated the tiebreak to take a set lead.
It was a similar story in the early stages of the second as the 14th seed saved three break points to keep the match on serve, but world number 44 Pospisil made consecutive breaks to level the encounter.
Both players were holding comfortably in the third before Bautista-Agut secured what would be the decisive break in game seven, before saving two break points in the next on his way to securing a 7-6[1] 3-6 6-4 win.
The world number 18 will face the winner of Federer versus Leonardo Mayer in the third round in China.