Tommy Robinson, the founder of the English Defence League, will be freed from prison after the court of appeal ordered that he should be retried on a contempt of court charge. He has been held at Onley prison after being jailed for 13 months following convictions for breaching reporting restrictions after broadcasting footage of trial defendants on social media.

Tommy Robinson was jailed in May after he filmed people involved in a criminal trial and broadcast the footage on social media

Robinson was jailed in May after he filmed people involved in a criminal trial and broadcast the footage on social media. The footage, lasting about an hour, was watched 250,000 times within hours of being posted on Facebook. The controversial activist was sentenced to 10 months in prison for contempt of court, which he admitted, and a further three months for breaching a previous suspended sentence.

Fast forward to today, when at the court of appeal on Wednesday, the lord chief justice, Lord Burnett of Maldon, upheld the conviction but said there should be a retrial for the Leeds case, the Guardian reported.

Tommy Robinson is free! pic.twitter.com/3MYzfVY7tn — Ezra Levant 🇨🇦 (@ezralevant) August 1, 2018

Robinson, the appeal court said, would be released on bail on condition that he attended the retrial before the recorder of London at a date to be fixed.

In the ruling, the lord chief justice said the Leeds finding of contempt had been “flawed”. That court should not have proceeded immediately but waited to hear the case on a “fully informed basis”, he said.

The judgment added: “It was unclear what conduct was said to comprise a breach of that order and the appellant was sentenced on the basis of conduct which fell outside the scope of that order.”

Robinson was also ordered to stay at least 400 metres away from Leeds crown court while on bail.

Outside the Royal Courts of Justice, supporters of Robinson and anti-racism protesters chanted rival slogans at each other separated by crowd barriers and police. Members of Stand Up To Racism shouted: “Say it loud, say it clear, refugees are welcome here,” and “Nazi scum”.

Supporters of Robinson shouted back: “You’re the racists”, and “Tommy is free”.

The judges had been urged to overturn contempt of court findings against Robinson, 35, whose real name is Stephen Christopher Yaxley-Lennon. At a hearing in July, his QC, Jeremy Dein, argued that procedural “deficiencies” had given rise to “prejudice”. Dein also submitted that the sentence was “manifestly excessive” and that insufficient regard had been given to personal mitigation.

Robinson was detained outside Leeds crown court after using social media to broadcast details of a trial that was subject to blanket reporting restrictions. Jailing him, Judge Geoffrey Marson told Robinson it was a “serious aggravating feature” that he was encouraging others to share it and it had been shared widely.

He added: “Everyone understands the right to freedom of speech but there are responsibilities and obligations. I am not sure you appreciate the potential consequence of what you have done. People have to understand that if they breach court orders there will be very real consequences.”

It was the second time Robinson had breached court orders, having narrowly avoided jail in May last year over footage he filmed during the trial of four men who were later convicted of gang-raping a teenage girl.

The judge on that occasion gave him a three-month suspended sentence and told him his punishment was not about "freedom of speech or freedom of the press" but about "justice and ensuring that a trial can be carried out justly and fairly".