The great 'Grinder' of the sport, Canada's Cliff Thorburn, was on hand to witness Selby gnaw at O'Sullivan's supreme confidence, wearing down the man who was chasing a third successive world title and a career haul of six that would have left him only one behind seven-time champion Stephen Hendry.
But it was Selby who ran out an 18-14 winner of snooker's ultimate prize last night, having been 8-3 and 10-5 behind and looking primed to become another in a long line of O'Sullivans victim in Sheffield.
He clinched it with an exceptional clearance of the colours, holding his nerve as though it were he who had won this title five times in the past.
With O'Sullivan beaten in the final for the first time, Selby punched the air in delight, the new world No 1 letting his emotions out before laying his hands on the trophy.
He then told BBC2: "[It's] amazing really. It couldn't be better. You want to win it with Ronnie in the tournament and there's no better way than playing him in the final. I want to thank all my supporters, my wife Vikki and the family and everyone who's stuck by me."
Reflecting on his comeback, he added: "I was just my usual self, dug in and never gave in. I didn't play pretty snooker early in the match but towards the end I played well. It was a tough day yesterday. The last two frames were huge. To get back to 10-7 - any other score, I had no chance."
Having lost the finals of this season's UK Championship and World Open, Selby was relieved to find his form on the big occasion this time around.
"I was sort of half-dreading coming to the World Championship because my form wasn't great," said the 30-year-old, nicknamed 'The Jester from Leicester'.
"I got back from China, I didn't play that well out there, and I just put in the hard work. Something seemed to click, and I came here confident."
O'Sullivan was magnanimous in defeat, saying: "I just want to congratulate Mark on a fantastic tournament. He's been the best player these last 17 days and had another good season.
"He just outfought me, outbattled me. It was tough. He had me in all sorts of trouble for two days. I tried my best but he was too tough and he's a worthy champion.
"Four or five years ago I would have freaked out in that match but I never gave up. I'm sorry for not giving the performance but I tried my hardest."
O'Sullivan had won 14 matches in a row at the Crucible, taking the 2012 and 2013 titles and charging to his sixth final this year. But where he had won each of those previous five finals, in Selby he struck upon an opponent who believed he could succeed, even when his hopes looked forlorn.
Selby had lost in the finals of the UK Championship and Masters already this season, so a hat-trick of such defeats in the tournaments that make up snooker's triple crown would have been tough to bear.
In the opening 11 frames, his highest break was a mere 42, and until he reaped a total clearance of 127 in the 30th frame his best was 74, contrasting with O'Sullivan's three centuries.
The new champion was chiselling out chances but needing two, three or four to win frames, but it was telling that O'Sullivan was presenting him with the openings. It was far from a classic O'Sullivan performance, with the 38-year-old looking deflated a long time before Selby passed the winning post.
In his recent book, O'Sullivan branded Selby a snooker 'torturer', and the drip, drip, drip of pressure, hard match play, and pedestrian pace added up to agony for a man with a history of struggling when such factors are pieced together by a high-class opponent.
O'Sullivan began the evening with a seven-minute century to get back to 12-12, but Selby soon restored his advantage, and the scrappier the frames became, the more the pre-match underdog appeared to have the edge.
He added the next to lead 14-12 - two frames ahead for the first time - and it meant he had taken nine of the last 11, having trailed 9-5 at one stage on Sunday.
And when a run of 56 nudged Selby three clear at the interval, he was just a further three from the winning line.
O'Sullivan cut his arrears with a solid response, including a break of 49, and made it 15-14 after a terrific run of 37 at the business end of the next frame, its highlight being a stunning long yellow.
It was Selby's turn to show the reaction of a champion, and his first century of the match showed he was not merely coping but thriving under the pressure.
He was two away, and on the brink after the next frame when he fired in 87 to lead 17-14.
He clinched his place in the Crucible pantheon in style, the final piece in the jigsaw of his career secured for a man with multiple titles elsewhere, including UK Championship and Masters crowns.