It’s all too easy to forget that when Theresa May called her snap election, three years earlier than she’d repeatedly promised, her party was 18-20 percentage points ahead of Labour in the polls. It seemed like a clear opportunity for the Conservatives to win a landslide. But the result has robbed her party of its majority.

So how can we explain such a dramatic shift in public opinion in only two months? And while Theresa May framed this as a Brexit election, can we be sure that voters’ views on Brexit actually caused this change? To answer this, I looked at the distribution of 2017 voting intentions against voters’ 2016 referendum vote to see how this changed during the two-month campaign.

The data demonstrate that May was mostly successful among Leave voters. She increased her support among them to about 70% on May 11-12 – but this number dropped to 60% closer to the election. She was much less successful with Remain voters, however: the number who said they would opt for the Conservatives reached a peak of 29% on May 11-12, then dropped to 24%.

In contrast, Labour leader Jeremy Corbyn successfully increased his party’s support among both camps. Whereas Labour was more successful among Remainers than Brexiteers, the percentage of both Remain and Leave voters who said that they would opt for Labour increased almost consistently as the campaign went on.

The logical question, then, is how the Labour party managed to increase its support from both camps even though neither the party nor its leader made Brexit a central theme of their campaign.

Health of the nation

It’s clear that since the 2016 referendum, Brexit has been the number one issue on voters’ minds. But one of the referendum’s unintended consequences was that it greatly elevated people’s concerns about the welfare state, putting them above even the economy and immigration.

Health in particular is increasingly important in the hearts and minds of Britons. (Recall the Leave campaign’s pledge to give the NHS the £350m the UK supposedly pays the EU every week.) Whereas 30% of the public thought health was the most important issue facing the country in July 2016, that number went up to 49% in May 2017 – much higher than the economy or immigration.

Jeremy Corbyn’s campaign tapped into precisely these concerns. Labour promised with zeal to protect the NHS and social care, saying it would obligate the rich and big business to help “the many not the few”. By contrast, the Conservative manifesto seemed insensitive to the fact that British people – irrespective of political affiliation or whether they voted Remain or Leave – want a stronger welfare state.

This territory traditionally favours the left, and Labour generally has enjoyed some sort of advantage over the Conservatives in this area. At the end of May, YouGov found that 39% of voters thought Labour was the party best-placed to handle the NHS, while only 23% put their ultimate faith in the Conservatives.

Of course, this wasn’t enough for Labour to win. Brexit is a sort of umbrella concept that includes a number of issues important to the electorate, including immigration – and this is where the Conservatives seem to have an advantage. Voter analysis suggests that the Conservatives are still the party believed to be most capable of handling both Brexit and immigration. But it looks like the election’s unexpected focus on social issues might have been the tipping point that gave the Labour party a net gain of 29 seats.

Above all, the results certainly indicate that the British people seem to want a stronger welfare state. It seems voters will not be happy with Brexit unless it comes with a social policy agenda that improves social cohesion, helps people improve their immediate well-being, and increases social mobility for all.