LONDON — Embroiled in a sprawling scandal over parties in Downing Street that broke lockdown rules, Britain’s prime minister, Boris Johnson, suffered a succession of setbacks on Friday in local elections as voters across the country abandoned his Conservative Party.
But by the end of the day, Mr. Johnson appeared to have survived the storm — for now at least — and to have turned the tables on the opposition Labour Party leader, Keir Starmer, who on Friday learned that the police will investigate whether he, too, broke lockdown laws.
That news grabbed headlines, taking the gloss off election results that had been good — but not spectacular — for Labour while boosting smaller, centrist Liberal Democrats.
With most of the votes counted in England, the Conservatives had lost more than 280 races to elect “councillors” — representatives in municipalities — in what Mr. Johnson acknowledged had been a “tough night in some parts of the country.”
The results were closely watched because, after Mr. Johnson was fined for breaking lockdown rules, some of his fellow Conservatives had been considering pressing for a no-confidence vote that could evict him from Downing Street.
Although his party avoided the type of electoral meltdown that might have propelled that threat to Mr. Johnson’s future, the results were nevertheless unnerving for a governing party that is confronting strong economic headwinds.
Adding to the party’s troubles, the Irish nationalist party, Sinn Fein, was on track to emerge as the largest party in Northern Ireland after legislative elections, a seismic political shift that could kindle hopes for Irish unity but also sow unrest in a territory where delicate power-sharing arrangements have kept the peace for two decades.
The Conservatives’ losses of two boroughs in London — Westminster, which has been held by the party since its creation almost 60 years ago, and Wandsworth — were serious symbolic blows.
“Waking up to catastrophic results for the party in London,” Gavin Barwell, who was chief of staff to the former prime minister, Theresa May, wrote on Twitter.
These flagship councils were held by Conservatives even when Tony Blair swept to power in a landslide election victory for Labour in 1997, and when the Conservatives imposed austerity measures after 2010 and under Ms. May, he noted.
“Losing them should be a wake up call for the Conservative Party,” Mr. Barwell wrote.
There was more bad news for the party in Scotland, where Conservatives suffered losses and a BBC analysis suggested that results projected nationally would give Labour 35 percent of the vote, Conservatives 30 percent and the Liberal Democrats 19 percent.
With 124 of 146 councils in England having declared their results, the Conservatives had shed more than 280 seats, which meant they lost control of several boroughs. Labour gained around 60 council seats, fewer than the Liberal Democrats, who gained more than 150. The Greens, another smaller party, also made advances, winning around 50 seats.
The setback to the Conservatives comes as Britain’s economic picture is deteriorating, putting the financial squeeze on Britons. Growth in Britain is expected to be the lowest in the G7 next year and domestic energy bills are soaring just as the government has been raising taxes. On Thursday, the Bank of England raised interest rates while warning that inflation could hit 10 percent.
With voters in a restive mood, a good performance by the centrist Liberal Democrats and the smaller Greens was another warning for Mr. Johnson. The risk for him is that Labour’s advances in big cities could be coming as Liberal Democrats or Greens make gains in parts of the south of England that are traditional Conservative heartlands.
But Labour’s progress outside London was mixed, and most analysts were skeptical of Mr. Starmer’s claims that the results marked a “massive turning point” for his party.
Labour’s challenge is to win back the so-called “red wall” regions in the north and middle of the country that it once dominated but which switched en masse to the Conservatives in the 2019 general election.
James Johnson, who was in charge of polling for Ms. May, wrote on Twitter that the results did not herald a dramatic recovery for the Labour Party “but they do show Labour doing as well in the Red Wall as they did when they last held the Red Wall — and that should worry Conservatives.”
In Wandsworth in London, some voters expressed anger at Mr. Johnson’s lockdown scandals as they went to vote.
“I would have always identified myself as Conservative, but this vote today was a vote to show that I don’t agree with the government,” said Marcel Aramburo, 62, who has lived in the area for decades.
While he said he was happy with the way local issues have been handled under the Conservative council, he felt it was time to vote Labour after becoming increasingly disillusioned with the Conservatives.
“I am unhappy with the people running this country,” he said. “Everything that comes out of their mouths is a lie.”
Yet Mr. Starmer, who has seized on Mr. Johnson’s difficulties over the Downing Street parties, now has a problem of his own with the news that the police will once again investigate allegations that he broke lockdown rules himself.
A finding that Mr. Starmer broke the law would put the Labour leader under intense pressure to quit, given that he has called for Rishi Sunak, the chancellor of the exchequer, to resign for briefly attending an illicit gathering in Downing Street to celebrate Mr. Johnson’s birthday. Mr. Starmer has been even more scathing about Mr. Johnson’s leadership after news of the Downing Street parties broke.
The allegations against Mr. Starmer center on a gathering in April last year at which he was pictured drinking beer with other party members during a campaign visit to Durham. That has led tabloid newspapers to call the case “beergate.”
The police had already looked into the case and decided to take no action but, on Friday, they issued a statement saying that in light of “significant new evidence” they were now investigating possible breaches of coronavirus rules.
But in recent days, Labour has come under pressure after it admitted that, despite earlier denials, the party’s deputy leader, Angela Rayner, was also at the gathering in Durham.
Megan Specia contributed reporting from London.