Sir Keir Starmer has hailed a “fantastic result” as Labour held Batley and Spen after a bitter by-election contest.
Kim Leadbeater won the West Yorkshire seat with a majority of just 323 – down from the 3,525 vote cushion the party had in 2019 – but the result was a surprise after opinion polls put the Tories in the lead and Labour insiders had feared the worst.
The victory will ease the pressure on Sir Keir, who had faced questions about his leadership after the loss of Hartlepool in a by-election in May, and will boost morale within Labour.
Ms Leadbeater secured the seat with 13,296 votes, with Tory Ryan Stephenson on 12,973 and George Galloway – who had targeted Labour voters and campaigned to topple Sir Keir – in third with 8.264.
The result means Ms Leadbeater now represents the seat previously held by her sister Jo Cox, who was murdered in the constituency in 2016.
Sir Keir hailed the “fantastic result” for the “brilliant and brave” Ms Leadbeater after a contest marred by allegations of dirty tricks and violence.
Ms Leadbeater said she was “absolutely delighted that the people of Batley and Spen have rejected division and they voted for hope”.
An emotional Ms Leadbeater thanked the police “who, sadly, I have needed more than ever over the last few weeks” and her family, saying that “without them, I could not have got through the last five years, never mind the last five weeks”.
“I want to give a special shout out to my niece and nephew who I cannot wait to hug as soon as I see them,” she said, in an apparent reference to Mrs Cox’s two children.
Mrs Cox’s widower Brendan tweeted: “We are all incredibly proud of @kimleadbeater today and Jo would have been too”.
“The people of Batley & Spen have voted for decency and positivity once again,” he said.
The Batley and Spen contest saw clashes between Mr Galloway’s Workers Party and Labour supporters.
The most controversial arguments centred on the parties’ stance on international issues, including Kashmir and Palestine, as they battled to secure votes in the area’s Asian communities.
Labour activists said they were pelted with eggs and kicked in the head on the campaign trail at the weekend and West Yorkshire Police said an 18-year-old man from Batley was arrested on suspicion of assault in connection with an attack on canvassers.
Ms Leadbeater was also confronted by a man who challenged her over the situation in Kashmir and her stance on LGBT education in schools amid what he said were concerns from Muslim parents.
Mr Galloway said he would take legal action to get the result set aside, claiming his election effort had been damaged by a “false statement” that he had laughed while Ms Leadbeater was abused on the campaign trail.
“The whole election campaign was dominated by lazy and false tropes about our campaign, about the thousands of people that voted for us, about their motives for doing so, in a way which defamed them as much as it defamed me,” he said.
“So on multiple grounds we will apply to the courts for this election result to be set aside.”
The result will offer some breathing space to Sir Keir amid speculation about a possible leadership challenge in Westminster.
Ahead of the contest his allies said he would not quit if Labour had lost, but reports had suggested supporters of deputy leader Angela Rayner were plotting a move against him.
Ms Rayner described the suggestion as “news to me”, while her spokesman said anyone gauging support is “not doing it under instructions from Angela or with Angela’s backing” and she is “focused entirely on her jobs”.
Following the result, Ms Rayner offered her congratulations to Ms Leadbeater “and the whole Labour team”.
A senior Labour source said: “Everyone’s been calling this a referendum on Keir’s leadership.
“Well we’ve won – bucked the trend, held onto this marginal seat and advanced in Tory areas. A fantastic result.”