Labour’s Simon Lightwood has won the Wakefield by-election, taking the seat from the Tories.
The by-election was triggered when ex-Conservative MP Imran Ahmad Khan quit after being found guilty of sexually assaulting a 15-year-old boy – for which he was jailed for 18 months.
Wakefield was one of the so-called red wall seats won by the Tories in the 2019 general election after being a Labour stronghold since the 1930s.
Mr Lightwood was elected with a majority of 4,925 on a swing of 12.7% from the Tories to Labour.
He said: “The people of Wakefield have spoken on behalf of the British people.
“They have said, unreservedly: Boris Johnson, your contempt for this country is no longer tolerated.”
Labour leader Sir Keir Starmer said: “Wakefield has shown the country has lost confidence in the Tories.
“This result is a clear judgment on a Conservative Party that has run out of energy and ideas. Britain deserves better.”
He said the result showed Labour “is back on the side of working people, winning seats where we lost before, and ready for government”.