Labour’s Kim Leadbeater has pulled off a surprise victory in the Batley and Spen by-election.

Tory challenger Ryan Stephenson had been expected to defeat Ms Leadbeater, sister of the murdered MP Jo Cox, after one of the most bitterly-fought parliamentary by-election campaigns in living memory.

Throughout the campaign, rival parties accused their opponents and their supporters of dirty tricks, intimidation including assaults, fake leaflets, dog-whistle racism and homophobia, prompting calls for police and election officials to intervene.

After she was confirmed to have won by 323 votes, Ms Leadbeater said: “I’m absolutely delighted that the people of Batley and Spen have rejected division and they’ve voted for hope”.

She described the campaign as a “gruelling few weeks”, making a point of thanking the police, saying she had needed their help more than ever.

She also thanked her friends and family, adding that she could not wait to hug her niece and nephew.

Turnout was just 47.6%, Kirklees Council said, with 37,786 verified ballots cast from an electorate of 79,373.

More from Politics

Labour mounted a massive push for votes in the final hours before the polls closed in the West Yorkshire constituency and at least two bundle checks were needed, as the race appeared closer than many commentators had expected.

Sky’s chief political correspondent Jon Craig said: “It has been an extraordinary by-election – one of the most ill-tempered and acrimonious in recent years”.

“What a sensational result, what a comeback for Labour when they were written off.”

The win will relieve some of the pressure on Labour’s leader Sir Keir Starmer, who Craig said would be a “mightily relieved man this morning”.

Sir Keir welcomed the “fantastic result for the brilliant and brave” Ms Leadbeater.

“Kim ran a positive campaign of hope, in the face of division,” he said.

“She will be an outstanding Labour MP for Batley and Spen.”

Ms Leadbeater was defending a majority of just 3,525 won at the December 2019 general election by former Coronation Street actress Tracy Brabin, who triggered the by-election with her election to the new post of West Yorkshire metro mayor.

Batley and Spen was held by the Conservatives from 1983 until Tony Blair’s landslide in 1997.