Labour has won the Wakefield by-election with 13,166 votes – a majority of 4,925 – taking the traditional Red Wall seat back from the Conservatives.
NHS worker Simon Lightwood will now represent the West Yorkshire city in the Commons.
Speaking after the result, Mr Lightwood addressed the prime minister, saying: “Boris Johnson, your contempt for this country is no longer tolerated, your government has no ideas, no plan to address the big issues facing our country.”
He told Sky News: “I think people are absolutely tired of the lies and deceit we’ve seen from the prime minister and they’re demanding change and tonight is the demonstration of that.”
He added:” This is a tremendous victory for the Labour Party, we’re re-building that Red Wall under the leadership of Keir Starmer.
“We’re listening to the people of the country and putting forward a vision for the future.”
The ballot was triggered by the resignation of Tory MP Imran Ahmad Khan, who quit after being found guilty of sexually assaulting a 15-year-old boy.
The seat had been represented by Labour since 1932, but was taken by Mr Khan in Boris Johnson’s 2019 landslide general election win.
The result is the first test of the prime minister’s leadership since last month’s confidence vote.
The Conservatives also appeared to be heading for a defeat in the Tiverton and Honiton by-election as the Liberal Democrats claimed an “historic victory” – though counting is still under way.