In a huge blow for Rishi Sunak, Alistair Strathern overturned a 24,664 majority to become the new MP for Mid Bedfordshire.
It is the first time the seat has had a Labour MP in its history.
The result even beats Labour’s win in Selby and Ainsty in July, when the Tory majority of 19,213 was toppled by Keir Mather.
Strathern received 13,872 votes, 1,192 more than his Tory rival Festus Akinbusoye, who polled 12,680. Lib Dem Emma Holland-Lindsay came third with 9,420 votes.
The swing away from the Tories to Labour was 20.5%.
Peter Kyle MP, Labour’s campaign co-ordinator, described the win as “the biggest by-election shock in history”.
The Mid Bedfordshire result was announced just half an hour after Labour won in Tamworth, another previously-safe Tory seat.