The local elections have been portrayed in the mass media as a disappointment for Labour ,a shot in the arm for Theresa May and a revival for the Liberal Democrats

In the pre election scenario Labour were expected to sweep all before them winning Tory councils in London and elsewhere, Theresa May was going to face a dire night and the Lib Dems were not going to do so well because of their poll ratings.

Yes Labour are partly to blame for creating this scenario with the promise of a Momentum style surge knocking the Tories out of Barnet, Westminster, Wandsworth and Hillingdon in London and winning Swindon, Plymouth and Trafford outside the capital. They had high expectations after the surprise rebirth under Jeremy Corbyn in the last general election and thought another heave would do it.

But it would be very foolish to write up these elections as the end of Labour’s progress or ruling out a slow revival of the Liberal Democrats.

For a start the final analysis of voting by the BBC shows that if there was a general election was based on these voting figures Labour would have got another 21 seats, become the largest party in Parliament . The Tories would have lost 38 seats and the Lib Dems gained another 10. If that had happened last year Theresa May would not have been able to form a government and it would be Labour plus a coalition that would be negotiating with Brussels. And if you compare it with last year’s council elections it was the Tories making nearly all the gains. not Labour.

A more detailed analysis shows why this is true. Although Labour did not gain the breakthrough to take another four London boroughs from the Tories, their vote share was much nearer than their seat share. In Westminster where the Lab vote share jumped by 7.6 per cent – the difference in percentage support between Labour and the Tories is not much more than point. In Wandsworth there is only a 150 votes difference between the Tories and Labour running the council.

Even in Barnet where Labour’s self inflicted wound over antisemitism led to a 13 seat Tory majority- the Tories biggest gains – the Labour share of the vote went up 2.8 pc but was trumped by a 6.6 per cent rise for the Tories.

Also not noticed in London is that Labour increased the number of seats on councils they already run, notably in Ealing, Enfield, Harrow, Hammersmith and Fulham and Waltham Forest – which will make it difficult for the Tories to regain Parliamentary seats.

In Swindon where Labour gained just one seat more people voted Labour than Tory but obviously not in the key wards. Interestingly in Plymouth where Labour won the council, more people voted Tory than Labour but not in the right places.

Also where councils switched from no overall control to Tory control – it was often by a couple of seats in places like Peterborough. The one exception was Nuneaton and Bedworth where the Tories were robbed – they got 51 per cent of the vote there but could win enough seats to take the council.

The other big factor which stymied Labour and helped the Tories was UKIP. Many UKIP voters became Tories so they could get a hard Brexit. In Basildon and Great Yarmouth this gave the Tories the edge over Labour. Labour did take back seats from UKIP, but the Tories took more. In Great Yarmouth former UKIP candidates actually became Tory candidates. Britain Elects shows this disparity examining 81 UKIP losses with the Tories gaining 47 seats from UKIP while Labour gained 30.

It should not be a total surprise that the Lib Dems do well in local elections, they have won quite a number of by-elections over the last year. But in three councils- where the whole authority was up for grabs – they did spectacularly well, trouncing the Tories. These are South Cambridgeshire, Richmond and Kingston, where they won sweeping gains pushing the Tories out. They also won seats in Hull, Sunderland and Gosport but were pushed back in Birmingham and Newcastle upon Tyne. \The Greens also added seats notably five in Lambeth.

So what is the prospect? The Tories can take comfort that they were not trounced and could claim a mandate for a hard Brexit after hoovering up much of the UKIP vote. It is rather ironic that Theresa May treated councils she had not lost as a victory parade-normally you go to places to celebrate a Tory win.

Labour need to tackle the antisemitic issue promptly and to reflect soberly on how they need more than an incompetent government to form a majority administration. And the Lib Dems need to build on their local government base as a springboard to win more seats in Westminster.

The reality for all parties is that it is going to be a hard slog to get or stay in government.