The husband of former Labour MP Jo Cox has welcomed the loss of deposits by far-right candidates who stood in the by-election triggered by her killing.

Labour's Tracy Brabin, a former Coronation Street actor, was overwhelmingly elected as Cox's successor in Batley and Spen on Friday (21 October), taking almost 86% of the vote in what she described as victory for "hope and unity".

Tracy Brabin
Labour Party MP Tracy Brabin is seen at the count in Jo Cox's Batley and Spen constituency, in Cathedral House, St Thomas Road, Huddersfield, in Yorkshire Craig Brough/ Reuters

The Conservatives, Liberal Democrats, Greens and Ukip had all said they would not field a candidate out of respect for Cox, who was shot and stabbed to death in Birstall, West Yorkshire, in June.

But nine fringe candidates – many from far-right parties – chose to stand. This included candidates from the British National Party (BNP), Liberty GB, the National Front and the English Democrats. None of the candidates reached the 5% of the vote required to retain their £500 (€562, $612) deposit.

Congratulating Brabin on her victory, Brendan Cox tweeted: "Great to see all the purveyors of hate lose their deposits." He had earlier called for residents of the constituency to use the by-election to "show the world that hatred has no home in Batley & Spen."

Brabin, who received 17,506 votes, gaining a majority of 16,537, was heckled on stage by some far-right candidates and supporters as she gave her victory speech.

Speaking over shouts of "she's a racist", Brabin said: "I want to start by thanking the wonderful people of Batley and Spen – my home community that I'm so proud of. This has been a difficult experience for all of us, and tonight is a bittersweet occasion for me. That this by-election has had to take place at all is a tragedy."

She said she had met many non-Labour supporters in the constituency who had decided to vote for her party as "a reaction to some of the fringe parties who chose to try and use this tragic by-election as an opportunity to sow division".

She added: "I hope Jo will be proud tonight of our community. We have shown that we stand together with one voice choosing unity and hope."

One independent candidate, Garry Kitchin, defended his decision to stand in the run-up to the by-election, saying he believes "basic democratic principles mean that, in every constituency, people have the right to a full range of candidates to choose from when they select their MP".

Thomas Mair, 53, has been charged with 41-year-old Cox's murder, possession of a firearm with intent and possession of an offensive weapon.

Batley and Spen by-election result (turnout: 25.56%)

Tracy Brabin (Labour) - 17,506 (85.84%)
Therese Hirst (English Democrats) - 969 (4.75%)
David Furness (British National Party) - 548 (2.69%)
Garry Kitchin (Independent) - 517 (2.54%)
Corbyn Anti (English Independence) - 241 (1.18%)
Jack Buckby (Liberty GB) - 220 (1.08%)
Henry Mayhew (Independent) - 153 (0.75%)
Waqas Ali Khan (Independent) - 118 (0.58%)
Richard Edmonds (National Front) - 87 (0.43%)
Ankit Love (One Love Party) - 34 (0.17%)