Tommy Robinson has lost his court case against a police force he claimed had harassed him by moving him on from a pub.

The English Defence League founder, appearing in court under his real name Stephen Yaxley-Lennon, claimed Cambridgeshire police targeted him because of his beliefs.

He was in a pub in Cambridge after taking his children to see Luton Town football club play at Cambridge United in August 2016.

Sgt Paul Street, who moved Robinson on, told Peterborough county court he did not know who Robinson was at the time. He said he moved him on due to intelligence that he was a football supporter likely to cause trouble, and was with a group of other “risk” supporters.

The judge, Karen Walden-Smith, said: “In my judgment there’s no evidence that Mr Lennon was being treated differently because of his beliefs about fundamentalist Islam.”

Giving her judgment on Friday after a four-day hearing, she added: “Mr Lennon isn’t as well known as he and his supporters may think.”

After the judge read out her decision, there was a shout of “the law’s an ass” from the public gallery, and Robinson said the judgment reflected the “entire corrupt system”.

He had claimed in court that he was drinking water in the pub.

The judge said that “as any good parent would, Mr Lennon tried to shield his children” from what was happening, but she said officers who followed him towards the station had followed “proper procedure” to ensure he did not loop back and return to the pub.

Walden-Smith ruled that all of his claims, including several under the Human Rights Act, had failed.

Street earlier told the court he did not know who Robinson was and thought his name referred to an “80s football hooligan”.

Robinson said he was with his three children, aged between five and nine at the time, on a family day out. Alison Gurden, representing the 36-year-old, said the police officer “didn’t take into account factors that he should have done”.

She said Robinson had been going in and out of the pub to see his children outside. “It wasn’t necessary [to move him on] as there was ... nothing to indicate Mr Lennon was likely to become involved in disorder,” she said.

“He’s there with his children and he’s certainly not dressed for a fight, he’s in his flip-flops.”

She said Robinson believed he was “discriminated against on the grounds of being Tommy Robinson and his beliefs”.

The judge ordered Robinson to pay £20,000 towards the defendant’s costs.

Robinson said outside court he would appeal against the ruling.