British number one Kyle Edmund reached the quarter-finals of the China Open with a hard-fought victory against Italy's Matteo Berrettini.
The 23-year-old was two points away from defeat in the third set, but rallied to beat the world number 58 7-5 6-7 7-5.
Edmund will face Croatian qualifier Dusan Lajovic in the last eight.
Lajovic progressed by beating world number eight Grigor Dimitrov 6-4 2-6 6-4.
German second seed Alexander Zverev is the highest ranked player left in Edmund's side of the draw.
Top seed Juan Martin del Potro faces Russian Karen Khachanov later on Wednesday.