London (CNN) Far-right activist Tommy Robinson was freed on bail Wednesday after winning his challenge against a 13-month sentence for breaching the strict rules that govern the reporting of criminal trials in Britain.

Robinson, whose real name is Stephen Yaxley-Lennon, argued that his case was heard too swiftly and that his sentence was excessive. Judges at the Court of Appeal agreed, dismissed the finding of contempt and ordered the case to be heard again.

Robinson's cause has been taken up by prominent right-wing figures in the United States, including US President Donald Trump's former chief strategist Steve Bannon.

He was jailed for 10 months in May after pleading guilty to contempt of court for a Facebook Live webcast during a criminal trial at Leeds Crown Court. He received a further three months for breaching the terms of an earlier suspended sentence.

Protesters hold up placards at a gathering by supporters of far-right figure Tommy Robinson in central London on June 9, 2018.

In their ruling, the judges were scathing about the way the Leeds case was handled, pointing out that Robinson was jailed within five hours of the alleged offense being committed.

"A sense of proportion must be retained," a summary of the judgment said. "Where a custodial term of considerable length is being imposed, it should not usually occur so quickly after the conduct which is complained of."

However, the judges dismissed Robinson's appeal against an earlier finding of contempt of court, relating to a case in Canterbury, Kent, in May 2017.

A small number of supporters, some wearing "Free Tommy Robinson" T-shirts had gathered outside Court of Appeal ahead of the ruling. Some sang "it's coming home, Tommy's coming home" as the judges' decision was announced.

A similar number of counter-protesters waved placards with messages such as "Don't let the racists divide us."

Robinson founded the English Defence League in 2009, a group that described itself as "the forefront of the counter-jihad." He left the EDL in 2013 but continued as a far-right activist, attacking the influence of Islamic extremism and arguing against Muslim immigration.

Demonstrators against Tommy Robinson protest outside the Royal Courts of Justice on Wednesday.

'Fundamentally flawed process'

Robinson's alleged contempt of court on May 25 occurred as the trial at Leeds Crown Court was coming to an end.

In the course of a Facebook Live webcast lasting about 90 minutes, Robinson filmed defendants as they arrived in court and discussed the trial, which was subject to tight reporting restrictions until it and two related trials had concluded. The jurors in Leeds had at this point retired to consider their verdict.

When the trial judge was made aware of the webcast, Robinson was brought into court and ordered to delete the video from Facebook in case it derailed this trial and the others. Hours later, he was sentenced to prison.

"The judge's initial action was both necessary and commendable," the appeal court judges said in their judgment. "However, we are satisfied that the finding of contempt made in Leeds following a fundamentally flawed process, in what we recognise were difficult and unusual circumstances, cannot stand."

In their judgment, the justices highlighted a number of failings. While the judge was right to act swiftly to have the material removed from Facebook, they said, there was no need to rush into contempt of court proceedings once that was done.

"In this case, no particulars of the scope of the alleged contempt were ever formulated, let alone in writing, or put to the appellant. With respect to all those involved in the hearing, there was some muddle over the nature of the contempt being considered, not only in the short exchanges which represented such formulation as there was, but also in the sentencing remarks," they said.

The failure to follow correct procedure represented "much more than a technical failure," the judges said.

The haste of proceedings meant Robinson's counsel had very little time to prepare mitigation. He was also wrongly recorded as having been convicted of a criminal offense, rather than found to have been in contempt of court.

"Although this is a matter of form capable of correction it does have serious consequences. Such errors should not be allowed to occur again," the judgment said.

The contempt of court case will now be reheard before a different judge, at a date to be decided.

A supporter of Tommy Robinson poses for a photo as Stand Up to Racism demonstrators protest outside the court on Wednesday.

Bannon's support

Until he was jailed in May, Robinson had long been on the margins of UK politics. However, since his imprisonment, supporters have staged vocal "Free Tommy Robinson" rallies and high-profile figures from the US right-wing have spoken out on his behalf.

Appearing on a radio show with former UK Independence Party leader Nigel Farage last month, Trump's former strategist Bannon talked of Robinson as something of a cause célèbre. "I don't think he's a bad guy. I think he's a solid guy and I think he's got to be released from prison," Bannon told Farage.

The previous month, a US State Department official, Sam Brownback, raised Robinson's case in a meeting with the British ambassador in Washington, Kim Darroch.

A Republican US congressman, Rep. Paul Gosar of Arizona, also voiced his support in a statement from the floor of the House of Representatives on June 12, in which he said the British government appeared "fearful of the truth."

Daniel Pipes, the founder of the Middle East Forum -- a Philadelphia-based group that "protects Western values from Middle Eastern threats," according to its website -- hailed the appeal court's decision Wednesday as "a victory for the #FreeTommy movement" and a rebuff to the "kangaroo-court judge" who jailed Robinson.

His supporters appear keen to present Robinson as a martyr for freedom of speech who can galvanize right-wing supporters in the United Kingdom as the country wrestles with the uncertainties created by Brexit against a backdrop of rising populism elsewhere in Europe.