KIM Leadbeater has said she hopes to heal the divisions in the constituency after a gruelling by-election campaign in Batley and Spen.

After defeating her Conservative rival by just 323 votes, she said constituents had "rejected division" and "voted for hope".

It means she will now represent the seat previously held by her sister Jo Cox, who was murdered there in 2016.

The by-election was triggered when the region’s former Labour MP, Tracy Brabin, was elected West Yorkshire mayor.

The ballot box race was seen as a straight contest between Labour and the Tories, and the result will ease pressure on Keir Starmer.  

She secured the seat – which Labour held at the 2019 general election with a 3525 majority – with 13,296 votes, narrowly beating Conservative Ryan Stephenson on 12,973.

Veteran left-winger George Galloway – who had targeted the constituency’s Muslim voters in a campaign to topple Sir Keir – was third with 8.264.

READ MORE: Nicola Sturgeon reacts to Batley and Spen result with attack on 'ugly' tactics

Following her victory Leadbeater said she had fought a positive campaign but that she had faced moments of “real unpleasantness”.

“Sadly we have seen some nastiness during this by-election campaign and there are some divisions that need to be healed. I think that if anyone can achieve that I can,” she told BBC Breakfast.

“I have conducted a very positive campaign. I have focused very much on the good people of Batley and Spen. I am incredibly grateful to the people of Batley and Spen for putting their trust in me.

“We have seen some poor behaviour. There have been situations where I have felt very intimidated.

“We have had some of our campaigners had things thrown at them and somebody has been arrested. There have been moments of real unpleasantness.

“If I can be half the MP Jo was I know I will do her proud and I will do my family proud.”

Brendan Cox, husband of murdered MP Jo, has said that he and his family were “incredibly proud” of Leadbeater “It’s a big day, just on that personal level we’re all incredibly proud of what Kim’s done,” he told the BBC.

“She was incredibly brave to step forward into it, not just around the security side of things given what happened to Jo but also the context, it was a very bruising and pretty horrible campaign at times.

“To put yourself into that and try and keep positive and try and keep a vision on what you want to change and how you bring people together I think she’s done an amazing (job).

“Win or lose frankly we would have been just as proud of her.”

READ MORE: George Galloway: I'll challenge Batley and Spen result in the courts after Labour win

Following a contest marked by allegations of violence and dirty tricks, Starmer paid tribute to Labour’s “brilliant and brave” winning candidate.

“Kim has shown inspiring resilience in the face of hatred and intimidation. She was unafraid to call it out and ran a positive campaign of hope,” he said.

“We won this election against the odds, and we did so by showing that when we are true to our values – decency, honesty, committed to improving lives – then Labour can win.

“This result shows Labour at its best. This is just the start.”

In her acceptance speech, Ms Leadbeater thanked the police “who, sadly, I have needed more than ever over the last few weeks”.

It followed reported clashes between Mr Galloway’s Workers Party and Labour supporters as they battled for votes in the constituency’s Asian communities.

At the weekend, Labour activists said they were pelted with eggs and kicked in the head, while police said an 18-year-old man had been arrested on suspicion of assault in connection with an attack on canvassers.

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.

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 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.

The result offers some breathing space to Sir Keir amid speculation about a possible leadership challenge in Westminster as the party continues to trail the Tories in the opinion polls.

Ahead of the contest his allies insisted he would not quit if Labour had lost, as deputy leader Angela Rayner was forced to distance herself from reports that her supporters were plotting a move against him.

A senior Labour source said: “Everyone’s been calling this a referendum on Keir’s leadership.

“Well, we’ve won – bucked the trend, held on to this marginal seat and advanced in Tory areas. A fantastic result.”

Conservative Party co-chair Amanda Milling said the result is “disappointing” but insisted it is not a “great win” for Labour.

“This was always going to be really a tough battle for us. Governing parties don’t tend to win by-elections. This is a Labour hold, not a Labour gain,” she told Sky News.

She acknowledged that the behaviour of Matt Hancock – who resigned as health secretary after admitting he broke social-distancing rules while kissing a close aide in his office – had been an issue in the final days of the campaign.

“It was something that came up on the doorstep, I have to be honest about that. They [voters] had some issues over the weekend in terms of what happened,” she said.