Yan Bingtao reeled off three frames on the spin to send Mark Selby crashing out of the German Masters.
Selby, who is struggling with his mental health, arrived in Germany looking to cement his place in the Players Championship.
A win over Yan would have set him on the way to achieving that goal and he was one frame from doing so when leading 4-2. But Yan produced steely snooker to set up a meeting with Ryan Day in the quarter-finals on Friday evening.
'I don’t know how hard he would have needed to hit it' - Bingtao misses pot, red barely moves
- Trump blows away Zhou to reach German Masters quarter-finals
- O'Sullivan to miss Turkish Masters, but who does Trump face at inaugural ranking event?
The spectators at the Tempodrom were treated to a Selby masterclass in the opener, as he got the better of a sustained safety exchange before knocking in a 48 to move ahead.
Runs of 87 and 57 saw Yan move in front, but a half-century from Selby drew him level at the interval.
While granite-like safety is a hallmark of Selby’s play, he is equally adept at making big breaks - as you would expect of a four-time world champion.
Selby resumed after the interval with a brilliant 119, and he followed up with a 57 and 51 in the sixth to move within one frame of victory.
Yan won a series of final-frame deciders on his run to Masters glory, so is not one to shy away from a fight. He was on the back foot after Selby’s three-frame run, but responded superbly with a break of 89 to draw within one.
The eighth turned into a war of attrition, and Selby was on the receiving end of a lesson in safety play. He kept getting out of tight spots, but Yan knocked in two outrageous doubles on brown and pink to force a decider, with the final pot prompting a rare show of emotion from the youngster as he hit the table with delight.
'Brilliant result' - Bingtao forces decider with beautiful pair of doubles
After being put through the wringer in the eighth, Selby had a chance in the decider and he looked set to take it when picking his way through a difficult table.
The key shot was a cannon off the blue, which he played superbly but was stopped in his tracks as a red dropped in the bottom right.
'Wow!' - The moment Selby's German Masters hopes faded away
Yan climbed from his seat, knocked in a half century to book his place in the quarter-finals and ended Selby’s hopes of making it to the Players Championship.
Earlier in the afternoon, Mark Allen beat Shaun Murphy 5-3 to set up a last-eight clash with Fan Zhengyi who beat Andrew Higginson by the same scoreline.
- - -
Stream the German Masters and other top snooker live and on demand on discovery+. A subscription for discovery+ is now £29.99 for the first year for UK users, down from £59.99
Williams battles past Bingtao for seventh Crucible semi-final
'Nearly took my head off' - Selby takes positives from Crucible after run-in with pigeon