LONDON — British voters angry about Brexit punished the country’s two main political parties in local elections on Thursday.

Prime Minister Theresa May’s Conservative Party lost more than 1,300 seats — more than a quarter of what it held before. The results were worse than the drubbing that had been predicted, and they prompted renewed calls for the embattled leader to step down.

Speaking at a Welsh Conservative conference on Friday, May said the results were “very difficult for our party,” but bad for the opposition Labour Party, too, and showed that voters wanted both main parties to “just get on and deliver Brexit.”

She was heckled by a Conservative activist who stood up and shouted, “Why don’t you resign? We don’t want you!” He was booed out of the hall, and May replied to the crowd in Welsh with “Good afternoon.”

Local elections are usually contests over who can better organize the recycling bins and help out the shops on High Street. Sometimes they’re a protest vote against the governing party. But like all elections since the 2016 Brexit referendum, these seemed to be something of a proxy vote for attitudes toward how Brexit is playing out and whether Britain should leave the European Union.

A bigger test looms with European Parliament elections on May 23, when Britain faces the awkward prospect of selecting politicians for an institution it’s trying to leave. 

Those results could be even more fragmented, as two new political parties will be fielding candidates: Nigel Farage’s Brexit Party and a pro-E.U. party called Change UK. Recent polling has shown the Brexit Party in first place. 

More than 8,000 seats were up for grabs in the elections held in many parts of England and Northern Ireland on Thursday, with results rolling in throughout the day on Friday.

By Friday evening, when all of the votes were counted, the Conservatives had lost a net 1,334 seats, according to the BBC’s count. Labour, which had hoped to make significant gains and prove it could win a future general election, lost 82.

The BBC projected that, if the local patterns held in a national election, Conservatives and Labour would tie with 28 percent of the total vote.

The smaller, unabashedly pro-European parties and independents were the big winners locally. The Liberal Democrats, a centrist party that started from a low base, was jubilant after gaining more than 700 seats. The Green Party also added nearly 200.

As ever with Brexit, the vote was split and the mandate open to interpretation.

Vince Cable, the leader of the Liberal Democrats, tweeted that his party was now ready to fight the upcoming European elections with a “clear message: Stop Brexit.”

Meanwhile, Labour leader Jeremy Corbyn echoed May with his assessment that there is now a “huge impetus” for Parliament to “resolve this issue — I think that is very clear.” 

Nicola Sturgeon, the first minister of Scotland, tweeted: “If the message Labour takes from English local elections is that they should now be the facilitator of a Tory Brexit, I suspect their troubles will just be beginning.”

May and Corbyn are holding cross-party talks in hopes of finding a way through the Brexit impasse. If they do strike a deal, they risk further inflaming tensions within their deeply divided parties.

May has indicated that she will stand down if and once her Brexit deal is passed by Parliament.

Tony Travers, a politics professor at the London School of Economics, said the election results showed the “disenchantment with Conservatives and Labour because of the broader mess of Brexit.”