Britain's ruling Conservatives on Friday held the former seat of ex-Prime Minister Boris Johnson but saw hefty majorities in two other seats blown away as scandals and high inflation took their toll.
Rishi Sunak was expected to become the first prime minister to lose three parliamentary seats on one day, but was spared that humiliation due to a narrow victory in the west London seat of Uxbridge and South Ruislip.
While that result may have offered the embattled Sunak some relief, the wiping out of his party's 19,000 majority in the Somerton and Frome seat and its 20,000 majority in the Selby and Ainsty constituency will come as hammer blows ahead of an expected general election next year.
Labour took the northern England seat of Selby and Ainsty by 16,456 votes to 12,295, in the process overturning its biggest deficit at a by-election since World War Two.
Winning candidate Keir Mather, 25, said in his victory speech that "for too long Conservatives here and in Westminster have failed us," accusing the government of "negligence and complacency."
In the southwestern England seat of Somerton and Frome, the Liberal Democrats won by 21,187 to 10,179, with winning candidate Sarah Dyke hailing a "stunning and historic victory" and taking aim at the "woeful government".
"We have been let down and taken for granted. This government is too busy being a circus of chaos -- enough is enough," she said.
The Tories had also been expected to lose Johnson's former seat of Uxbridge and South Ruislip, but won by 13,965 votes to 13,470, delivering a blow to Labour leader Keir Starmer and London's Labour mayor Sadiq Khan.
Winning candidate Steve Tuckwell said the "number one" issue had been Khan's expansion of a tax on polluting vehicles to outer London boroughs.
He said Labour MPs in similar seats "will now be panicking" and the result is likely to spark conversations between Starmer and Khan.
- 'Local issues' -
However, heavy defeats in the other two contests leave Sunak increasingly vulnerable ahead of next year's likely general election, with parliament's six-week break providing welcome relief.
The main opposition Labour party are currently enjoying double-digit poll leads and are poised to retake power for the first time in over a decade.
It has now won six by-elections since March last year, with two of those seats captured from the Tories.
The Uxbridge and South Ruislip contest was triggered after the scandal-tarred Johnson resigned as an MP last month.
He quit after learning that a cross-party parliamentary committee had concluded he deliberately lied to lawmakers about lockdown-breaking parties during the Covid pandemic, and recommended a 90-day suspension.
While much attention had been on Johnson, voter Deborah Willott, 65, told AFP: "It's a by-election so it's really focused on the local issues much more than if it was a general election," as she cast her ballot in a church polling site.
Johnson's ally Nigel Adams quit shortly afterwards after failing to be nominated for a peerage, triggering the Selby and Ainsty by-election.
The third vote in Somerton and Frome was called after its Tory MP David Warburton stood down following an admission of cocaine use.
Sunak, who has not been visible on the campaign trail, sought to project a business-as-usual image Thursday but privately briefed backbench MPs to expect the worst.
- Sunak struggles -
Sunak became prime minister following the disastrous 44-day tenure of predecessor Liz Truss and initially succeeded in stabilising financial markets panicked by her radical tax-slashing agenda.
But the 43-year-old former finance minister has struggled to reverse his party's declining fortunes, which first set in during the so-called "Partygate" scandal under Johnson.
Sunak's turnaround efforts have in part been hobbled by persistently high inflation, which in recent months has spooked the markets once again.
With interest rates at their highest in 15 years, pushing mortgage and other borrowing costs ever higher, the worst cost-of-living crisis in a generation is showing few signs of abating.
Sunak kicked off the year by making five key vows to voters, including halving inflation, growing the economy and cutting waiting times at the overstretched National Health Service.
He has made little headway on most of the pledges, and there are persistent fears the UK will tip into recession this year as the high interest rates constrain spending.
Sunak's net favourability has fallen to its lowest level (-40) since he entered Downing Street, with two-thirds of Britons saying they have an unfavourable view of him, according to YouGov.