British number one Cameron Norrie was knocked out of the Madrid Open as China's world number 99 Zhang Zhizhen's history-making run continued.
Zhang - the first Chinese man to break into the top 100 - had never before recorded an ATP Masters 1000 win prior to this year's tournament in Madrid.
But the 26-year-old battled back from a set down to stun Norrie, ranked 13th, with a 2-6 7-6 (7-2) 7-6 (7-2) win.
He is the first Chinese man to reach round four at a Masters 1000 event.
Meanwhile, it is a fifth defeat in seven matches for Norrie, who lost in the second round at the Barcelona Open last month following first-round exits at both the Monte-Carlo Masters and Miami Open.
Zhang backed up his first ATP 1000 win in the opening round in Madrid with a notable victory over Canadian Denis Shapovalov for his first win against a top-30 ranked player.
He went one better on Monday, upsetting the odds to eliminate Norrie after recovering impressively from a one-sided first set, which the Briton sealed by winning five successive games.
Norrie was punished for not managing to take one of his five break points in the second set, with Zhang dominating the tie-break and levelling the match with a sixth straight point.
With neither player able to find a way through in the deciding set, Zhang once again held his nerve in the tie-break to upgrade his biggest ever career win and extend his dream run to a fourth match.
Zhang, who received a standing ovation for his efforts on court three, will face American number one Taylor Fritz for a place in the quarter-finals.
"I didn't even think I was going to be here in the second week of Madrid," said Zhang. "Now I've made it. This is a big victory because it was an amazing match."
Fritz progressed with a 6-1 7-6 (7-4) over Chile's Cristian Garin.
Elsewhere, Russian world number two Daniil Medvedev and Greek world number five Stefanos Tsitsipas both progressed in three sets.
Medvedev had to come from behind to beat compatriot Alexander Shevchenko 4-6 6-1 7-5, while Tsitsipas overcame Argentine Sebastian Baez 7-5 3-6 6-3.
But American ninth seed Frances Tiafoe lost 6-1 7-6 (7-2) to Pedro Cachina, of Argentina.
In the women's draw, second seed Aryna Sabalenka and world number three Jessica Pegula are both through to the quarter-finals.
Belarusian Sabalenka eased past Mirra Andreeva 6-3 6-1 and American Pegula won 6-3 2-6 6-3 against c.