One of the highlights of Sunday night was a clearly stunned Tommy Robinson (real name Stephen Yaxley-Lennon) fleeing the count in Manchester after realising that his hope of becoming an MEP was shattered. He polled just 2.2%, taking only 39,000 votes in the north-west and lost his deposit.

When he first announced his candidacy, it seemed inconceivable that the man who had founded the English Defence League could become an MEP. Yet we also knew that he was the best-known far-right activist since the second world war, and better known than most of our politicians.

Over half the public had heard of him, and while there was huge opposition to him, 5% of society viewed him positively

Over half the British public had heard of him, and while there was overwhelming opposition to him, 5% of society viewed him positively. As a consequence, we took his candidature seriously. Private polling commissioned by Hope Not Hate of 1,100 voters in the North West England EU parliamentary constituency found support for Yaxley-Lennon on just 1.5%, well below the 8.5% he needed to stand a chance of winning a seat. However, we were conscious that this probably underestimated his support – not least because the typical Yaxley-Lennon supporter was probably less likely to be on a YouGov survey panel.

Our polling found another 3% (adjusted to 4.5%, when “don’t knows” are excluded) picked him as their second preference and, in all, 6% of respondents said that they were more likely to vote for him if they thought he had a chance of being elected.

It was these figures, combined with a concern over a low turnout, that made us think he stood a small chance. The polling, however, also gave us the route to defeat him.

From the outset we decided to direct our campaign at turning out the voters who were most likely to oppose his anti-immigrant, divisive policies. We modelled the North West region where he was standing on potential voters’ attitudes to Yaxley-Lennon and targeted our campaign to the streets where those opposed to Yaxley-Lennon were most likely to live.

In total we identified approximately 400,000 households where we believed strong anti-Yaxley-Lennon voters lived, and repeatedly engaged with them. We delivered over 360,000 leaflets to these houses and backed this up with a highly targeted social media campaign. We had different messages going to different voters, depending on what it was that we felt would move them most.

We also did not ignore the white working-class communities targeted by Yaxley-Lennon. In Wigan, Bury and Oldham, we distributed localised leaflets to the households that he was targeting.

In a complete reversal from our normal campaign strategy, we decided from the outset to try to keep his name out of the local media so as not to give him undue publicity. We turned down request after request for quotes and stories, though we were always keen to speak to media consumed by our anti-Yaxley-Lennon voters.

We were helped by the shortcomings of Yaxley-Lennon’s own campaign. He surrounded himself with people with no campaign experience – and that showed in the first fortnight, where he prioritised areas with little footfall. He had little idea who his voters were, and spent most of his time attacking the Labour party, not understanding that his core vote had split with Labour many years ago.

Instead, he was competing with Nigel Farage’s Brexit party and Ukip, so it was a huge own goal that he did not make much of the past failure to condemn IRA violence of Claire Fox, the lead Brexit party candidate in the North West.

Yaxley-Lennon has made much of his ban on most social media platforms, claiming that this helped prevent him winning. There was a clear disparity between his poularity online and on the ground (potentially even more so for Ukip’s Carl Benjamin, the misogynistic YouTuber whose donation-driven personal “brands” exist almost entirely online and whose toxic candidacy did much to torpedo Ukip’s chances at these elections). While clearly this deplatforming hampered Yaxley-Lennon’s ability to get the message out, he also knew about these restrictions from the outset but did little to think of ways to get around them, largely ignoring local media. He launched his campaign in chaotic fashion on some grass in the middle of a working-class estate in south Manchester.

As it was, the campaign was all about him. He surrounded himself with people like him. His events were attended by people like him. Meanwhile the infamous “milkshakings” he (and others) received also sparked a viral campaign, with memes spreading like wildfire across social media.

It is hardly surprising that Yaxley-Lennon’s vote was relatively small. There are some who will say that Yaxley-Lennon was and is a distraction from the threat posed by Nigel Farage and the Brexit party. Of course, in wider political terms that is correct. But, for the north-west, Yaxley-Lennon being elected would have given him a huge platform to spread his anti-immigrant poison, and that would have had severe consequences for local communities and community tension. Fortunately, the people of the North West area roundly rejected Lennon, and for that we should all be happy.

Where he heads now we’ll have to see, but it’s unlikely that “Brand Tommy” will disappear just yet: after all, as well as stirring up hate, most of his “campaigning” is actually about himself and his lavish lifestyle, so he desperately needs to keep himself in the headlines.

• Nick Lowles is chief executive of Hope Not Hate, the UK’s largest anti-racism and anti-extremism movement