Labour has lost Hartlepool, a constituency it had held since its creation in 1974.

So what went wrong and what does it mean?

– What happened in Hartlepool?

Conservative candidate Jill Mortimer has become the new MP, defeating Labour’s Paul Williams.

The importance of the contest was underlined by both Boris Johnson and Labour leader Sir Keir Starmer making repeated visits to the constituency during the course of the campaign.

– How bad a result is this for Labour?

Very. It is rare for a governing party to gain a seat at a by-election, the last one was another northern Labour seat in Copeland in 2017 and before that you have to go back to Mitcham and Morden in 1982.

Labour held Hartlepool in 2019 even as other parts of the Red Wall in northern England crumbled, although the warning signs were there – while the 3,595 majority looked solid enough on paper, actually a strong Brexit Party vote may have helped prevent a Tory victory.

The result suggests that replacing Jeremy Corbyn at the top of the party has not helped Labour regain the ground lost in its former heartlands, something that will add to pressure on Sir Keir.

– What does it mean for Sir Keir Starmer?

He has asked for time to allow Labour to rebuild from the calamitous 2019 general election, warning that the party had a “mountain to climb”.

Sir Keir has insisted “this is a changed Labour Party” that is “under new leadership” in an attempt to distance himself from the Corbyn project.

But the change at the top of the party does not appear to have helped in Hartlepool, a town which heavily backed Brexit and whose voters may well have been suspicious of a Labour leader who – despite wanting to move on from the rows over Europe – was closely associated with calls for a second referendum.

– So what next?

Unless Sir Keir can hit upon a formula for winning back voters in northern England then his chances of getting the keys to No 10 at the next general election appear remote.

But while the Labour leader has his critics, notably those on the left of the party loyal to Mr Corbyn, his position appears secure, with most MPs acknowledging the scale of the challenge he faces and the way in which the pandemic has meant his first year in office has been far from normal.

However Westminster is rife with rumours that a shadow cabinet reshuffle could be used by Sir Keir to bring in fresh faces in an effort to revive the party’s fortunes.