Defending champion Mark Selby lost the longest frame in Crucible history as he crashed out of the World Snooker Championship against China's Yan Bingtao.

Selby came off worst in an epic 22nd frame lasting 85 minutes and 22 seconds – comfortably eclipsing the previous mark of 79 and a half minutes set by Gary Wilson and Luca Brecel in 2019.

And a subsequent nerveless century by 22-year-old Yan completed a gruelling 13-10 success and sent him into a quarter-final clash with three-times champion Mark Williams.

Selby looked on the bright side, having entered the tournament having battled mental health concerns for much of the season and pulled out of the previous two tournaments in Turkey and Gibraltar.

"I’m proud of myself," said Selby. "After really struggling and not enjoying the game, I came into this tournament not really knowing what to expect.

"I felt as though I was the better player for much of the match. It felt like my game was coming back a bit and I was enjoying it, so it’s positive going forward."

Yan had built a two-frame lead heading into their concluding session and looked set to make short work of the champion when he won the first two frames in the evening to extend his lead to 11-7.

But Selby surged back to within one frame with consecutive breaks of 86, 117 and 88, setting up the ultimately crucial 22nd frame which Yan finally won after squeezing the black into the middle.

Ronnie O'Sullivan is aiming to match Stephen Hendry's record seven world titles

Earlier, Ronnie O'Sullivan shrugged off two more Crucible records after winning the solitary frame he needed to polish off a 13-4 win over Mark Allen and cruise into the quarter-finals for the 20th time.

As well as eclipsing the previous best he shared with Stephen Hendry for reaching the last eight, O'Sullivan's 71st career win also took him clear for the number of matches won by a single player at The Crucible.

Typically O’Sullivan, who is now favourite to match the Scot’s record of seven Crucible crowns next week, repeated his regular assertion that he has no interest in most of the plaudits that keep coming his way.

"It doesn’t mean anything to me," insisted O’Sullivan. "They’re not the kinds of statistics that I’m proud of. The ones that I’m proud of are the majors and that’s about it really."

O’Sullivan had done all the hard work in the first two sessions of his match against Antrim man Allen, making their return on Saturday a formality.

But he insisted the relatively-effortless nature of his victory belied a tough battle to stay at the top of his game, invoking the example of martial arts superstar Bruce Lee.

"It comes down to quite a few years of practice and years of dedication and of trying to be the best version of yourself that you can possibly be," added O’Sullivan.

"If you look at Bruce Lee, he trained for many hours, not just mentally but physically. We’re experts in different fields but I try to approach my sport in a way which is no different.

"It’s not easy – I really struggle with it, to be honest with you. Even when I steam-rollered everyone in 2012, it wasn’t easy. It is all about just playing to have fun, enjoy it and relish every moment even when it’s not going great."

Drastic measures were taken by Stephen Maguire

O’Sullivan will face Stephen Maguire in the last eight after the 41-year-old Scot made the most of a borrowed cue to withstand a fightback from UK champion Zhao Xintong.

Maguire resumed the final session of their match two frames from victory but lost four of the first five on Saturday before a break of 59 saw him seal a 13-9 win over the Chinese seventh seed.

Maguire, a two-time semi-finalist who has plummeted to 40 in the current world rankings, revealed he took drastic measures after being distinctly unimpressed with his form during a gruelling first-round win over Shaun Murphy.

Maguire, who is guaranteed at least £50,000 by reaching the last eight, said: "When I played Shaun I was rubbish and Shaun was even worse, so I went back up to Glasgow and made my mind up that I wasn’t coming back with that cue because I felt like I had no chance.

"I borrowed my mate’s cue and had a couple of days of practice with it and liked it and it has seemed to pay off. I’ll ask my mate how much he wants for it – hopefully not a lot."

Zhao had threatened to launch a stirring comeback after making a good start to their final session and could have heaped more pressure on Maguire in the 22nd frame, only for a missed pink to the middle to effectively end his chances.

"I think I can learn from this experience and next year I will be better," said Zhao, for whom defeat rounds off a breakthrough season that saw him clinch the UK and German Masters crowns. "I have confidence that one day I will win this tournament."

Neil Robertson fired two consecutive century breaks to haul himself level with Jack Lisowski at the end of the opening session of their second-round match.

Lisowski had won four frames in a row to turn a 2-0 deficit into a 4-2 lead, but the Australian dug deep to make it 4-4 ahead of their resumption on Sunday.

And a gruelling opening session between Judd Trump and Anthony McGill also ended all square, with each player scoring a century before McGill took the last of the day to keep the match in the balance.