Theresa May didn't win. She just lost less badly

Early exit polls showed Conservative losses and proved accurate.Reuters

Nothing about it was pleasant.

Even ardent Theresa May fans, of which there are significantly fewer now than six weeks ago, cannot not claim this was a good campaign.

First the refusal to debate. Then the needless demeaning of the press summed up by locking reporters in a room and then giving answers such as this:

These were the early signs that 'strong and stable' might not do what it said on the tin.

Then came the manifesto.

In hindsight it wasn't that bad. Yes it was a mistake to emphasise social care rather than Brexit. Yes it was a howling error not to state a cap before the state would pay for care.

But the overwhelming, glaringly horrendous, mind-boggling error was the U-turn. How any party can U-turn on its own manifesto, let alone one claiming to be the competent alternative to 'chaos', is anyone's guess.

Lest we forget, this came after more U-turns on major polices such as a rise to National Insurance Contributions.

Despite ample room in the polls to endure a week or more of sustained criticism, Theresa May bottled it and with it lost her reputation as a steely and tough leader.

And yet, despite the terrible result, Theresa May could still stay as Prime Minister. Whether that gives her a 'mandate' for Brexit negotiations is another matter.

Crucially Theresa May lost less badly than Jeremy Corbyn – even though his campaign outperformed expectations.

This was an election where faith and religion played a bigger part than anyone could have anticipated.

First there was Tim Farron. The Lib Dem leader was repeatedly asked whether he thought gay sex was a sin, largely by people who neither knew nor cared what 'sin' was.

Interestingly the focus was not on what his policy stances on gay relationships were – he clearly supports equal rights – but on what he thought privately as an evangelical Christian.

After more than a week of ducking the question in a variety of interview he finally, reluctantly and painfully, said he did not think it was a sin, saying the reason he had not said so earlier was 'as a political leader my job is not to pontificate on theological matters'.

Then it emerged he had said 10 years ago that 'abortion is wrong'. Senior Lib Dems said he had 'changed his mind' since the interview – something that Farron himself denied insisting he was 'pro-choice' and always had been.

'I believe in choice – women should have access to abortion that is legal and is safe.'

He told Sky News: 'My motive in all of this is all about compassion towards these women and to say, as I did 10 years ago, that women should be able to make that choice under law, that abortion should be safe and legal.'

When pressed again on whether he thought abortion was morally wrong as a Christian, he said angrily: 'I think people think it's bizarre that journalists and others spend their time banging on about someone's faith.'

Although Farron may have summed up the feelings of many viewers, and certainly many Christians, ducking questions on faith may have hurt him more than simply saying what he believed and defending his liberal stance.

A poll found his socially conservative views do not repel voters – only nine per cent think him dangerous and 15 per cent irresponsible.

But repeated wriggling out of saying what he thinks has left just four per cent of voters thinking he is strong and five per cent saying he is courageous.

Tim Farron was embroiled in a second scandal around his Christian beliefs after an interview emerged where he said 'abortion is wrong'.Harry Farley

The final way religion affected this election was in the worst way imaginable.

Twice campaigning was halted because a terrorist attack hit the UK – firstly in Manchester killing 22 at a teen concert and then in London, leaving seven dead and nearly 50 injured.

Both times the attackers had Islamist motives and left real questions over what can be done to tackle extremism in the UK.

It's impossible to know exactly how these attacks affected the outcome, but they loomed large in final days of the camapign - especially in regard to funding for policing.

The future is now unclear. The scrutiny which Theresa May has been under during the campaign will now ramp up further. The suprising result of the June 2017 General Election isn't a bookend, but just the latest chapter in the turbulent past few years of British politics.