Britain’s beleaguered Prime Minister Rishi Sunak suffered a damaging political blow on Friday as voters rejected his party in two parliamentary elections it could ordinarily have expected to win.

The Conservative Party lost to the resurgent Labour Party in Selby and Ainsty, a region in the north of England where the Sunak’s party had enjoyed a commanding majority.

A second seat, Somerton and Frome, was won by the Liberal Democrats, a centrist party.

The Conservatives just managed to hold on to a third seat in Uxbridge and South Ruislip, the constituency held by former Prime Minister Boris Johnson until his resignation from parliament last month, although Labour significantly grew its share of the vote.

The results will put Sunak’s leadership under pressure, and suggest his government is on course for an electoral defeat at the next general election, expected next year.

Sunak has struggled to reverse the Conservatives’ plummeting fortunes in the nine months he has held office; a series of scandals, a stuttering economy and a decline in Britain’s public services have left his party deeply unpopular.

But the results indicate that the opposition Labour Party, which under the leadership of Keir Starmer is on course to clinch power when Sunak calls a general election.

By law, a general election must take place by January 2025. Most observers think Sunak will call it in the fall of 2024, if not before, to avoid trying to persuade voters to cast their ballots in the middle of winter.

Thursday’s three by-elections provided the sternest mid-term test yet for Sunak, who took power after Liz Truss’s shambolic six-week premiership last fall.