The Tory candidate won 51 per cent of the vote, up by 23 per cent on their 2019 result, while Labour fell back 9 per cent on the vote share won under Jeremy Corbyn in 2019.
With a majority of around 7,000 the Conservatives won almost twice as many votes as Labour in the seat.
The result is a major political turnaround for the town, where Labour increased its majority as recently as 2017, then moving from 35 per cent of the vote to 52.5 per cent.
Outside the town’s Mill House Leisure Centre where the count was taking place, a local group calling themselves the Hartlepool Wombles installed a massive inflatable of Boris Johnson. It stood there, taller than the pub it was anchored to, its thumbs up. “If he can get this town moving again, he’ll do me,” said landlord Taffy Turner.
Conservative campaigners say the result of the vote was apparent some hours before the final declaration was made – and that activists for Keir Starmer's party had disappeared as a result.
“The Labour campaigners have all shot off to Sunderland,” one told The Independent. “But we’re coming for them there next.”
A Labour source close to Keir Starmer appeared to blame the previous leadership for the result, telling reporters: “The message from voters is clear and we have heard it. Labour has not yet changed nearly enough for voters to place their trust in us.
“We understand that. We are listening. And we will now redouble our efforts. Labour must now accelerate the programme of change in our party, to win back the trust and faith of working people across Britain.”
But the analysis was met with a barrage of criticism from the left of the party. Andrew Scattergood, co-chair of left-wing group Momentum, described the result as a "disaster".
Pointing out that the seat had been held twice by Labour, with over 50 per cent in 2017, he said: "A transformative socialist message has won in Hartlepool before, and it would have won again.
"Starmer's strategy of isolating the left and replacing meaningful policy with empty buzzwords has comprehensively failed. If he doesn’t change direction, not only will he be out of a job - but the Labour Party may be out of Government forever."
Labour MP Richard Burgeon said the defeat was "incredibly disappointing", stating: "We are going backwards in areas we need to be winning.
"Labour's leadership needs to urgently change direction. It should start by championing the popular policies in our recent manifestos - backed by a large majority of voters."
But defending Sir Keir’s leadership, Steve Reed, the shadow communities secretary, said “the party has changed”.
“We’re going to see a lot more results throughout today and Saturday and over the weekend, from elections right across the country, so we’ll have a clearer picture at the end of that period, and I suspect the results are going to be patchy,” he told BBC Breakfast.
“Certainly from my door-knocking - places like Sheffield, Nottingham, Bristol, Milton Keynes, Hertfordshire - the reaction on the doorstep to me as a Labour campaigner has been a lot warmer than it has been in recent years, but that isn’t enough if it’s not translating into votes.”
Meanwhile, a celebratory Conservative party co-chair Amanda Milling described the result as “historic”.
“We’re delighted that the people of Hartlepool have put their faith in Jill and the Conservatives to deliver on their priorities: to bring the change, investment and jobs Hartlepool deserves,” she said after the result.
“The work to repay that faith starts right now, as we continue with our agenda to level up and build back better from the pandemic.”
Boris Johnson made repeated visits to the consituency in the final stages of the campaign, an apparent sign the Tories expected to win the seat.
Questions hung over Labour’s candidate Paul Williams during the campaign: a staunch remainer picked for a strongly Leave seat, Dr Williams had been rejected by voters in another consituency down the road in 2019, but apparently given the nod for the candidacy from the leader’s office, who saw him as an ally.
The Conservatives appeared to be the only party to benefit from the collapse of the Brexit party vote – unlike in 2017 where Labour managed to increase its vote share on the back of the collapse of the Ukip vote.
It is extremely rare for the government to win a seat from the opposition at a by-election.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies