Conservative candidate Ryan Stephenson came second with 12973 votes, while George Galloway (Workers Party) got the third highest number of votes with 8264 ballots in his favour. See the full results below.
Kim Leadbeater said: “I’m absolutely delighted that the people of Batley and Spen have rejected division and they’ve voted for hope.”
She thanked her family saying “without them I could not have got through the last five years nevermind the last five weeks.”
Labour leader Sir Keir Starmer said the Batley and Spen by-election was “fantastic result for the brilliant and brave” Kim 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.”
The by-election was triggered when former Labour MP Tracy Brabin became West Yorkshire’s first elected mayor, leaving the seat open.
The seat has been held by Labour since 1997, but in the run up to the election bookies and pollsters had the Conservatives as odds-on favourites to win.
Kim Leadbeater, who is the sister of murdered MP Jo Cox, was selected as the Labour candidate, but the chances of the party retaining the seat narrowed after controversial former Bradford MP George Galloway entered the race for his own Workers Party.
Mr Galloway had said he wanted to win over Labour voters in the seat to topple Sir Keir from the leadership.
Tensions between Mr Galloway’s Workers Party and Labour supporters made the campaign increasingly bitter, with Labour activists alleging they were pelted with eggs and kicked in the head while on the campaign trail at the weekend.
Batley and Spen by-election full results:
Paul Bickerdike (Christian Peoples Alliance) - 102
Mike Davies (Alliance For Green Socialism) - 104
Jayda Fransen (Independent) - 50
George Galloway (Workers Party) - 8264
Tom Gordon (Liberal Democrats) - 1254
Thérèse Hirst (English Democrats) - 207
Howling Laud Hope (The Official Monster Raving Loony Party) - 107
Susan Laird (Heritage Party) - 33
Kim Leadbeater (Labour Party) - 13296
Oliver Purser (Social Democratic Party) - 66
Corey Robinson (Yorkshire Party) - 816
Andrew Smith (Rejoin EU) - 75
Ryan Stephenson (Conservative Party) - 12973
Jack Thomson (UK Independence Party) - 151
Jonathan Tilt (Freedom Alliance) - 100
Anne Marie Waters (The For Britain Movement) - 97