Brendan Cox said some candidates who contested the seat where his wife was killed by a neo-Nazi in 2016 had sought to “divide communities, to turn people against each other, and pour petrol on flames rather than bringing communities together”.
He told The Independent the campaign had tipped over from robust political debate into “intimidation and abuse”, after physical attacks on canvassers.
Labour candidate Kim Leadbeater, who is Ms Cox’s sister, was chased by an anti-LGBT+ activist shouting about “indoctrination” in schools days before voters went to the polls.
Tracy Brabin, the West Yorkshire mayor and former Batley and Spen MP, said another group of Labour campaigners were “kicked in the head” and pelted with eggs on Sunday, sparking a police investigation.
The previous day had seen hundreds of protesters descend on Batley after far-right candidate Anne Marie Waters called a day of action, while activist Laurence Fox held a “free speech” rally in the town on 24 June.
The campaign had been dogged by accusations between different parties of smear campaigns and dirty tactics, including the removal of posters and use of fake political leaflets.
Mr Cox said there was a “fine line between robust political debate, which is absolutely essential, and intimidation and abuse”.
He added: “I think at times it has crossed over into intimidation and abuse, whether that’s of Kim or whether that’s of activists on the street. Whichever party is at the receiving end of that, I think it is a real problem for our politics.
“The reality is that people who are willing to use violent rhetoric, to rile people up and to generate a level of hostility and anger, share responsibility in the consequences of that.”
The election came almost exactly five years after Ms Cox, then Batley’s sitting Labour MP, was murdered by a neo-Nazi after leaving a constituency surgery.
Following the terror attack, the message that people have “far more in common than things that divide us” from her maiden parliamentary speech became a rallying cry in a push for a kinder politics.
Mr Cox said he believed that politicians who play on division would be “on the losing side of history” and highlighted the huge advances in equality in his late wife’s lifetime.
But he added: “The tone of the political debate is something that should worry us - the willingness of people to scream and shout at each other, to paint these very simplistic pictures or us versus them, of goodies versus evil.”
Mr Cox acknowledged that there were pre-existing “tensions and divisions” in Batley, which have been stoked by the row over the use of a cartoon depicting the Prophet Muhammad at Batley Grammar School in March.
Several far-right candidates who ran in the by-election used protests against the teacher their key campaign point, claiming they were proof of “Sharia law” and “Muslim dominance”.
Meanwhile, a leaflet from George Galloway’s team said he would “campaign for the freedom of religious people not to have their faith or their prophets maligned and ridiculed” and “demand parental involvement in the school curriculum”.
Mr Cox accused Mr Galloway of “playing factional community politics” and called the far-right candidates, including former Britain First deputy leader Jayda Fransen, a “political and electoral irrelevance”.
“These are all individuals on their own petty little ego trips,” he added. “None of them have anything resembling a political movement or force behind them.”
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies