Britain’s Conservative Party suffered striking early setbacks on Friday in local elections that are viewed as a barometer for how the party will perform in a coming general election and a key test for the embattled prime minister, Rishi Sunak.

Only a minority of the results had been announced by early Friday, but already the signs were ominous, if not unexpected, for Mr. Sunak’s Conservatives, who have trailed the opposition Labour Party by double digits in national polls for 18 months.

The Conservatives have lost more than 120 seats so far, including six in Hartlepool, in northeast England, where the Conservatives had made inroads after Brexit but have more recently lost ground to the resurgent Labour Party.

Labour also won a special election for a parliamentary seat in Blackpool South, a seaside district, in a huge swing of votes away from the Conservatives, who had held the seat but narrowly missed finishing third, behind Reform U.K., a small right-wing party. The previous Tory member of Parliament, Scott Benton, resigned in March after becoming embroiled in a lobbying scandal.

Labour’s leader, Keir Starmer, described it as a “seismic win,” and the most important result of the day, though many more races were still to be declared, some of which could mitigate the pain for the Conservatives if they end up eking out victories.

“This is the one contest where voters had the chance to send a message to Rishi Sunak’s Conservatives directly,” Mr. Starmer said, “and that message is an overwhelming vote for change.”

The Conservatives said in a statement that the vote in Blackpool South was “always going to be a difficult election given the specific circumstances related to the previous incumbent.”

Voters went to the polls on Thursday in 107 towns and cities in England to elect local council members as well as 11 mayors, including in London, the West Midlands and Tees Valley, in the northeast of England. More results will be announced throughout Friday and the weekend.

With Mr. Sunak’s party badly divided and time running out before he must call a general election by next January, the results were being closely watched. While analysts expected the Conservatives to lose a significant number of seats, a worse-than-expected outcome could galvanize Mr. Sunak’s critics inside the party to try to topple him and install another leader.

The prime minister’s allies hope that some conspicuous victories — particularly in two regional mayoral races — would reassure Tory lawmakers, stabilize his shaky leadership, and end speculation about whether he will lead the party into the general election, expected in the fall.

The result of one of those races, in Tees Valley, is expected to be disclosed around midday Friday, while another, in the West Midlands, is not expected until Saturday. In both elections, the Conservative candidates have campaigned more on personal popularity than on their party affiliation.

Even if the Conservatives win both those mayoral races, they are still braced for the loss of at least 400 council seats of the 985 they are defending. Many of these elections are in towns and cities that were traditionally dominated by the Labour Party, but that switched to the Conservatives in the years after the 2016 Brexit referendum.

To make matters more difficult, the last time many of these races were fought, in 2021, Mr. Sunak’s Conservatives were enjoying a period of popularity because of a robust rollout of a coronavirus vaccine by one of his predecessors, Boris Johnson. That means the Tories could have a long way to fall back.

In addition to Hartlepool, the Labour Party won control of councils in Redditch, Thurrock, and Rushmoor in Hampshire, although it had a setback in Oldham, where it remains the biggest party but lost overall control of the council after some of seats fell to independents.

For Mr. Starmer, the election is a chance to show that he has a credible chance of becoming Britain’s next prime minister, as current polling suggests. Despite his party’s strong numbers, few voters seem enthused by Mr. Starmer, who is viewed as a competent but not especially charismatic politician.

Voters in London will have to wait until Saturday to discover if their mayor, Sadiq Khan, has won a third term, the first for a London mayor since the post was created in 2000. A defeat of Mr. Khan by his Tory opponent, Susan Hall, would be a big surprise, as the British capital leans left politically, but assuming he wins, the margin of victory will be watched for signs of dimming popularity.

The overriding challenge is for the Conservatives, however. A heavy loss of seats could demoralize the party faithful and panic Tory lawmakers, who fear that they will be tossed out of Parliament in the general election.

Since they were last elected in a landslide in 2019, the Conservatives have already ousted two leaders, Mr. Johnson and Liz Truss. Toppling a third would be risky, since there is no obvious replacement guaranteed to be more successful than Mr. Sunak, who was chancellor of the Exchequer under Mr. Johnson.

Mr. Johnson offered a reminder of his disorganized leadership style on Thursday when he turned up at a polling station without the necessary photo identification — a requirement that had been introduced by his own government in 2022 — and was turned away (he returned later with the proper ID).

For Mr. Sunak, the polls are now so dire that some see a new leader as the only possible way to fend off a ruinous defeat in the general election. In January, one former cabinet minister, Simon Clarke, called on the prime minister to resign, but that failed to foment a bigger rebellion.

For those who think that such a gamble is worth taking, the aftermath of local elections would potentially be the last chance to move against Mr. Sunak before he puts his party on alert for the general election.

Dismal Conservative results in local elections in 2022 were a prelude to the ouster of Mr. Johnson, though not the trigger for it: He was finally purged two months later after mishandling an unrelated scandal.

Supporters of Mr. Sunak argue that he can benefit from a fall in inflation, the prospect of an economic recovery and by putting into action his plan to put asylum seekers on one-way flights to Rwanda, a policy that is popular among Conservatives and may help fend off a threat from the anti-immigration Reform U.K. party.

Earlier this week, the government published video footage of asylum seekers being detained in preparation for being deported to Rwanda.