There is a clear story from the local elections last night: a Liberal Democrat surge. It is important to note that voters see local elections as an opportunity to protest, and register their discontent with the sitting party. Even so, the Tory party’s performance was excruciatingly bad. One might have expected those gains to have gone to the main opposition party, too. Instead, Labour has lost seats. Those wishing to protest the current government have voted for the Lib Dems or Greens instead.

But it is the Lib Dems that have gained territory all over the map. They increased their majorities in places they already hold, such as North Norfolk. They crept into Brexiteer areas, such as Hinkley and Bosworth in Leicestershire, which voted 60% to leave in the EU referendum. In Theresa May’s constituency of Windsor and Maidenhead, they cut a Tory majority of 38 down to five. But a major part of the story is the huge swing from Tories to Lib Dems in the area often referred to as the “former Lib Dem heartlands” – the south-west. The Lib Dems were almost wiped out there in the 2017 general election, now they are claiming it back.

Those trying to work out how the party’s approach might have changed will not have to look particularly hard. In 2017 the Lib Dems conducted an election campaign which was strangely soft on Brexit. The south-west was mainly leave, and the party was remain, so it decided to tread softly and try not to mention Brexit. Chippenham’s candidate, Helen Belcher, told me at the time that she didn’t particularly push the topic on the doorstep. “People will vote Lib Dem more as an objection to austerity than Brexit,” she said. “Road quality is poor, and there is no real investment in infrastructure. Key issues are things like the NHS and schools.”

This was the gentle anti-Brexit message on the Lib Dem website in 2017: “We believe that Britain’s best chance to succeed is within the EU. The terms of Brexit will have a huge impact on jobs, security and the opportunity to travel and live abroad.” Compare it with the current one: “Vote Liberal Democrat. Stop Brexit”, and: “When remainers rise up – as one – and demand an exit from Brexit, we can and will win the argument and stop Brexit.”

The Lib Dems now have a clear message – as does the Green party, the second biggest winner in these local elections, with almost 90 new seats. That cannot be said of either of the main parties. Labour and the Tories will be left wondering whether voters are punishing them for their prevarications, or because there has been a vast anti-Brexit sea change in the country. (There have been reports of Brexiteer ballot-spoiling, but Ukip lost 12 seats). What is clear is that remain voters are not to be underestimated.

Will the Lib Dems carry through their victory in the European elections later this month? It is possible. They will face a new challenge, though: the Change UK/Independent Group, which did not stand in the local elections. This party is aiming for the same voters – it has also defined itself as anti-Brexit, and has so far been resistent to the idea of a pact with the Lib Dems. But it would be wise to change its mind on the basis of these results. Failure to form a pact would harm both parties, and likely hurt Change UK more.

The Lib Dems are a party of deep resilience – they are able to summon extraordinary comebacks from near wipeout. They also have the stronger brand and the infrastructure. What they were lacking was the perception that they could win anything. But these local election results might just begin to shift that.

• Martha Gill is a political commentator