In a night of shocks, this was perhaps the biggest. By a clear margin and with an undisputed majority, ITV won the election.

ITV, for crying out loud. The channel of Jeremy Kyle, the channel of legitimately inept football punditry, the channel of endless soul-destroying weekend Jurassic Park repeats, somehow managed to outmanoeuvre the competition and provide this year’s best general election coverage.

The title was the BBC’s to lose. Traditionally, that’s always where you go for reassurance in times of uncertainty. The BBC has the technology for events such as this. It has the proficiency. It has the Dimbleby. And yet something felt off. The studio was 25% too big, which made everyone seem like they were screaming at each other inside an immense aircraft hangar. Poor Mishal Husain found herself cloistered away behind a colossal sneeze-guard on some distant mezzanine. Worst of all, someone had let a fly loose, and watching it continually distract and belittle David Dimbleby gave the presentation the air of a hamfisted regional Poe recital.

Channel 4, too, underperformed. Its biggest crime, forgivable as it was, was believing the experts. “Millions of people are preparing for the most boring night of their lives,” quipped David Mitchell 45 seconds before the exit poll tipped everyone into a tizzy. Once announced, it threw the programme’s entire strategy for a loop.

Laboriously heaving into a succession of pre-prepared bits – a weird “Jeremy Corbyn’s popularity in Rotten Tomatoes scores” segment, an interminable Gogglebox election special where a handful of slouching viewers listlessly insulted Leanne Woods – when the competition was fizzing with blown-mind reactions was unforgivable.

It would rally in time. By focusing on more traditional discussion and analysis – with Jeremy Paxman mediating Alastair Campbell and Ann Widdecombe’s loveless marriage while Mitchell heckled from the sidelines – Channel 4 regained some traction, but by then it was too late. The moment had passed.

And, with Sky News trapped at the bottom of the EPG, showing an endless loop of ballots being counted like a bad 1950s schools documentary, that left ITV with everything to play for.

My God, did it play. Host Tom Bradby pinged around the studio with crazed abandon, attending to all the various tables and charts and set-ups like a man determined to get through his speed-dating event before the Viagra wore off. The big gimmick – something called #MEDIAHUB, which was basically Nina Hossain trying not to get bashed in the face by all sorts of gigantic cardboard social media standees – was admittedly a bit “Here’s Rylan with the texts”, but if ITV can’t be charmingly shonky at times then what’s the point of it at all?

Its masterstroke, however, was its choice of pundits. Robert Peston, obviously, was MVP of the night, dragging up and hurling out dozens of potential ramifications for the exit poll with clearsighted ease while everyone else panicked around him. Then there was Showbiz Ed Balls, grabbing the mainstream vote with his slick haircut and shirt unbuttoned to his navel, eyes continually twinkling with the promise of another busted-out Gangnam Style routine.

But the real draw was George Osborne, permanently trapped in an unknowable vortex somewhere between laughter and tears.

The woman who sacked him had tanked, but much more spectacularly than he anticipated. Slowly he began to realise that, if he’d clung on and contested his seat, he’d probably be a shoo-in for leader by sunrise. Instead he was left feverishly licking his lips like a hungry snake with a crushed tail. Vengeance and despondency. Relish and regret. Forget Broadchurch, this was the most complex drama ITV has aired in years.