Reform UK have won the Runcorn and Helsby by-election by just six votes in a blow to Sir Keir Starmer's premiership.
The narrow victory saw Nigel Farage's party taking a constituency which Labour won with a majority of almost 14,700 at the general election less than 12 months ago.
Politics Live: Could Reform finally get a toehold of power?
The by-election in the Cheshire seat was called after the previous MP Mike Amesbury resigned following his conviction for punching a constituent.
Reform candidate Sarah Pochin won with 12,645 votes, compared to the 12,639 secured by Labour candidate Karen Shore, making it the closest by-election result since records began in 1945.
Speaking after the result was declared, Mr Farage told Sky News' chief political correspondent Jon Craig that Labour's vote collapsed because of a "loss of confidence" and the fact "no one knows what the prime minister really stands for".
He said working people are fed up with higher taxes and illegal immigration, adding: "It's a sense of fairness and what's right and what's wrong bordering even on resentment.
"We've picked that up very strongly on the doors for people who voted Labour for all of their lives."
Mr Farage also declared the Conservatives as "toast", saying: "In much of this country if you vote Conservative you will get Labour.
"We now are the opposition party in the United Kingdom to the Labour Party and the Tories, frankly, are a waste of space."
The vote in Runcorn is Sir Keir's first by-election test as prime minister.
Ellie Reeves, chairwoman of the Labour Party, told Sky News incumbent governments "never tend to do very well in parliamentary by-elections" and this one was held in "very difficult circumstances".
She defended her party's record, saying that people are impatient for change but "change doesn't happen overnight".
However, Tory co-chairman Nigel Huddleston said that while it was a "bad night" for his party, it was a "terrible night" for the government, saying it is losing support because of "terrible policies".
He dismissed Reform's success, saying: "They are emerging into a populist popular party, not an alternative to the Conservatives, but trying to transcend and promise everything to everybody. That is not a long-term sustainable position."
Reform win first mayoral election
The Runcorn declaration was delayed as the close nature of the contest led to a recount.
As well as the Runcorn by-election, voters on Thursday took part in contests to elect more than 1,600 councillors across 23 local authorities, along with four regional mayors and two local mayors.
In further good news for Reform, Dame Andrea Jenkyns was elected as the party's first mayor in Greater Lincolnshire, with a majority of almost 40,000.
In her victory speech, the former Conservative minister, who defected last year, said there would be "an end to soft-touch Britain" and declared "the fightback to save the heart and soul of our great country has now begun".
She added: "I say no to putting people in hotels. Tents are good enough for France, they should be good enough for here in Britain."
Please use Chrome browser for a more accessible video player
Analysis: Reform has put the two traditional parties on notice
Elsewhere, Reform looks set to gain control of Staffordshire County Council after taking 24 of the 30 seats to be counted overnight, with the Conservatives winning the other six.
There was some good news for Labour as it held on to the North Tyneside mayoralty in the first vote of the night - albeit by just 444 votes.
In Runcorn, Nigel Farage has just eaten Labour for breakfast
Why did Reform pull off their victory? Rachel Reeves’ massively unpopular winter fuel payments axe was a major vote loser. Some voters were appalled by the conduct of former Labour MP Mike Amesbury, who brutally assaulted a constituent.
Ms Pochin, in a fluent victory speech that suggested she’ll be a competent House of Commons performer, declared that the voters of the Runcorn and Helsby constituency had had enough of Tory failures and Labour lies.
Then, in a typically ebullient Sky News interview, Mr Farage said: “Britain is broken.” He also predicted more wins for his party in local government elections later on Friday.
For Labour, there will be a huge inquest into how they came so close to holding the seat and lost by just six votes. Many Labour MPs and party members will condemn Sir Keir Starmer for not bothering to visit the constituency to campaign for their candidate Karen Shore.
Mr Farage visited four times, including a lengthy stint on polling day. Say what you like about Mr Farage, and his opponents certainly do, he’s a tireless campaigner with a stamina that astounds even members of his inner circle.
His relentless tenacity has paid off handsomely. Other party leaders – with the notable exception of Sir Ed Davey – take note. Sir Keir sat on his hands and Kemi Badenoch was invisible too.
And they’ve both paid the price: humiliation.
And so, after declaring the Tories are “toast”, Mr Farage announced he was heading off for a bacon sandwich.
Last week at Prime Minister’s Questions, Sir Keir said Mr Farage would “eat the Tory party for breakfast”.
But in Runcorn and Helsby - and many other parts of the UK - he’s just eaten Labour for breakfast as well.
Labour also saw off Reform in the West of England and Doncaster to retain both mayoralties. However, in Doncaster it was also a slim majority, with Labour's Ros Jones clinging on by 698 votes.
Ms Jones criticised decisions to means-test the winter fuel allowance, hike employers' national insurance contributions and squeeze welfare.
She told the BBC: "I think the results here tonight will demonstrate that they need to be listening to the man, woman and businesses on the street, and actually deliver for the people, with the people."
'First 10 months not good enough'
Some Labour MPs have also called for a change of course, with veteran backbencher Diane Abbott hitting out at the cut to winter fuel payments on X and Richard Burgon calling the Runcorn result "entirely avoidable".
Brian Leishman, a Scottish Labour MP, said people voted for an end to austerity in the general election and Sir Keir's first 10 months in office "haven't been good enough or what the people want".
X This content is provided by X, which may be using cookies and other technologies. To show you this content, we need your permission to use cookies. You can use the buttons below to amend your preferences to enable X cookies or to allow those cookies just once. You can change your settings at any time via the Privacy Options. Unfortunately we have been unable to verify if you have consented to X cookies. To view this content you can use the button below to allow X cookies for this session only.
"If we don't improve people's living standards, then the next government will be an extreme right-wing one," he warned.
Former shadow chancellor John McDonnell hit out at the "tin eared" response from the Labour leadership over the results, saying voters feel the party has "turned its back on them" because of policies like the winter fuel changes, NI tax on jobs and cuts to disability benefits.
Kim Johnson, in the nearby Liverpool constituency of Riverside, said Runcorn "is a warning we can't ignore" adding: "Voters want change - and if we don't offer it with bold, hopeful policies that rebuild trust, the far right will."
Lead politics presenter Sophy Ridge, political editor Beth Rigby, and data and economics editor Ed Conway will be live on Friday morning to report and explain the results.