Blimey, so who saw that coming?

The election campaign began with speculation as to just how big a majority the Conservatives would gain and ended with the Tories’ lead still in double figures in many of the polls.

But we awoke to (or stayed up for) the sight of all those predictions being turned on their head as the Tories lost seats and Labour and the Liberal Democrats gained them.

In Brighton Kemptown and Hove, Labour outdid its most optimistic expectations, as did Caroline Lucas in Brighton Pavilion.

Further afield, Labour almost unseated Amber Rudd in Hastings and in Eastbourne the Liberal Democrats’ Stephen Lloyd re-took the seat he had held until 2015.

But it wasn’t just in the seats that changed hands that we saw significant electoral changes.

Apart from Ukip being decimated (both locally and nationally), throughout Sussex Labour performed, on average, twice as well as it did nationally.

So the big question is why?

There are always local factors and personalities involved but, given the consistency of the result across most of the UK, national explanations are more likely to have the ring of truth about them.

First and foremost was Mrs May’s ill-fated decision to call the election which, although she claimed it was because of Brexit, it was clear that with Labour at its weakest and the tempting prospect of a 100-plus majority, party considerations clearly loomed large.

Having taken the decision to go for a snap poll, Mrs May, no doubt following the instructions of her Australian spin doctor Lynton Crosby, set out to bore the electorate to death by endlessly intoning “strong and stable” and “coalition of chaos”.

Lesson One for future Prime Ministers contemplating a snap election: have something to say in addition to bad-mouthing your opponent.

Lesson Two for future Prime Ministers contemplating a snap poll – don’t run away from TV debates and interviews.

And Lesson Three, don’t produce a manifesto whose most- eye-catching aspect is an attack on one’s own supporters, which in this case amounted to threatening to cut the old-age pension, to means-test the winter fuel allowance and to impose what was rapidly dubbed the dementia tax.

But it wasn’t just a case of Mrs May’s mistakes, legion as they were; Jeremy Corbyn and Labour fought a very good campaign.

Of course there were cock-ups –TV and radio interviews that went wrong for example – but overall it appears that people responded to what they saw as Corbyn’s enthusiasm, decency and authenticity.

The other strength of the Labour campaign was that, unlike Mrs May, their leader was seen around the country addressing large and boisterous crowds and, even though they were mostly Corbyn supporters, the pictures that we saw on the nightly news conveyed a sense of excitement and enthusiasm

And that brings us to the real “heroes” of the campaign.

The much maligned younger voters, who so demonstrably failed to vote in the Euro referendum, turned out in record numbers.

In the 2015 election barely 40 per cent made it to the polls; this time round more than 70 per cent did.

Obviously, not all of them voted Labour but, according to the polls, more than two in three did and that seems to have made the vital difference.

As for the polls, perhaps we should pass over them in respectful silence, because despite their attempts to correct the mistakes they made in 2015, with the exception of YouGov, they did even worse this time round.

To be fair to them there is a simple explanation and it’s not that people lie – for everyone who lies one way, they are cancelled out by someone else lying the other way; it’s that in the past the British electorate was pretty predictable but we are now a much more turbulent and unpredictable lot.

Take Ukip, for example. Its collapse was not unexpected but it was assumed that most of its voters would go to the Conservatives but it appears that almost as many switched to Labour.

So much for the national campaign, but in Brighton we’ve seen a new political phenomenon take shape.

The so-called “progressive alliance”, in which people vote for the party they think best placed to defeat the party they liked the least (in this case the Conservatives), achieved impressive results.

Whereas the national movement of votes from Conservative to Labour was around two per cent, in Brighton Kemptown Labour’s Lloyd Russell-Moyle achieved an impressive ten per cent swing to unseat the Tories’ Simon Kirby.

Even more impressive, in Hove, Labour’s Pete Kyle achieved a 15 per cent swing to convert a marginal 1,200 majority to a whopping 18,000 one; and Caroline Lucas for the Greens, doubled her majority to almost 15,000.

As a footnote, it’s worth noting that while Labour’s Corbyn- supporting Momentum organisation threw all their efforts into winning the Kemptown battle, Peter Kyle, who they had at one stage vowed to unseat, achieved an even better result.

Mrs May wanted this election to be about Brexit and Jeremy Corbyn but poll findings suggest that cuts in public services was a bigger issue and this might have been a factor in Brighton where local schools mounted an effective campaign to make sure that parents knew that the cuts being forced on them were a result of central, rather than local, Government decisions.

So we now face the prospect of the Conservatives governing “with the permission” of Northern Ireland’s Democratic Unionist Party, more a ‘coalition of chaos’ than the ‘strong and stable’ government that Mrs May promised at the outset.

It’s a prospect that will doubtless be regarded with some apprehension by those Conservative MPs who do not favour the hard Brexit which is the DUP’s policy.

And if that apprehension grows, Mrs May could face the prospect of losing a vote of confidence, which means we could find ourselves facing another election before the year is out.

Now won’t that be fun?

l Ivor Gaber is professor of journalism at the University of Sussex and a former political correspondent at Westminster