Let us know what you think and join the conversation at the bottom of this article
Hailing the result as a victory for positivity, the SNP leader said she was pleased the Labour candidate had won in the West Yorkshire seat after Ms Leadbeater’s supporters were allegedly assaulted.
She won the 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.
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.
In a tweet this morning, Ms Sturgeon said: “You don’t have to be a Labour supporter to be pleased that Kim Leadbeater has been elected as MP for her late sister’s constituency.
"Observing from afar, the campaign looked ugly at times - made so by deliberate tactics from some quarters. It is good to see that defeated.”
Labour leader Sir Keir Starmer also 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.
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.`