The last two times I’ve gone to bed reasonably confident my side would win an election, I’ve had a rotten, sleepless night.

Last night I went to bed reckoning my side would fall just short and Richmond Park would be added not to the list of great Liberal by-election triumphs (Orpington, Eastbourne, Brent East) but of near misses (Birmingham Hodge Hill, Henley, Witney).

And to think liberals are supposed to be optimists… 2016 has, though, severely tested our usually sunny disposition.

Anyway, huge congratulations to Sarah Olney for over-turning Zac Goldsmith’s 23,000+ majority. A 22% swing isn’t a record; though it may be if you factor in the campaign was only five weeks’ long.

Three quick thoughts on its implications:

1. Boost to Lib Dem profile

Ever since the May 2015 electoral catastrophe, the Lib Dems have been regarded by much of the media (print and broadcast) either as a joke or an irrelevance — or both. The Richmond result won’t stop that altogether, but it might give some pause for thought.

Diane James’s brief sortie as Ukip leader achieved top-item billing on the news programmes; by contrast, the election last year of Tim Farron, now the longest-serving national party leader (!), merited just a few seconds towards the end of the BBC News at Ten.

Perhaps, just perhaps, Richmond Park will mean the media gives the Lib Dems a fair chance.

2. Forget the policy, feel the campaign

I’m, not a big fan of the Lib Dems’ Brexit strategy. I explained why here. I think Brexit will happen, indeed has to happen. I’d prefer us to be practical about how it happens.

But maybe I’m wrong (it’s been known). For a sensible Brexit to take place, there needs to be a contest of views. Labour, wholly self-absorbed, looks to be hopelessly incapable for the forseeable of providing any leadership on the European issue.

That leaves the Lib Dems as the only national, mainstream, unabashedly pro-European (too much so sometimes) party with any clout. If the Lib Dems don’t resist the ‘hard Brexiteers’ and their jingoistic folly, who will?

I still don’t think the Lib Dem Brexit strategy — a second referendum once the deal’s terms are known — is likely to succeed. But, perhaps, this time that simply doesn’t matter. The debate needs some Remain anchoring and that task is now the Lib Dems’ duty.

The fact it also appears to be a pretty canny campaigning strategy is just a bonus.

3. The Scotland analogy

This is tentative. There are lots of — obvious — difference between the current national political picture and the earthquake in Scottish politics this past decade. (Not least of which is the sensitivity of the electoral system.)

And yet…

The SNP has secured a dominant position, at least for the moment, as the doughty defenders of national interest. Ditto the Tories at a UK level.

Meanwhile Labour is falling between two stools: in Scotland it is neither quite pro-union nor pro-independence; on Europe, it is neither quite pro- or anti-Brexit. That’s mostly because these issues divide its voters most viscerally in its heartlands; it’s also because of a pattern of weak leadership both north and south of the border.

Which leaves Tim Farron as the English Ruth Davidson. At this point I admit the analogy strains, but stick with it…

The Tories have rescued themselves in Scotland, elbowing Labour aside as the opposition, because of the opportunity which fell to them: to be the unequivocally pro-union principal opposition to the separatist SNP.

I’m not for a moment claiming the same could be replicated imminently in England: Labour’s strength is too entrenched, the Lib Dems still too battered and bruised.

But what I am saying is that a Lib Dem revival which even six months ago looked like being the hard graft of a quarter-of-a-century might just be a lot more rapid.