Former English Defence League (EDL) leader Tommy Robinson has been released on bail after winning an appeal against a contempt of court finding.
The 35-year-old admitted the charge and was jailed in May for filming outside Leeds Crown Court during a trial.
At the Court of Appeal, Lord Chief Justice Lord Burnett ruled the case be reheard after identifying technical and other failings.
Robinson's solicitors said everyone has the "right to a fair hearing".
The far-right activist, from Luton, was not present for the ruling in London and was released from his 13-month sentence being served at Onley Prison, near Rugby just before 15:30 BST.
Speaking to reporters, Robinson said: "All the British media do is lie. I have a lot to say but nothing to you.
"I want to thank the British public for all their support."
In his written judgement, Lord Burnett said: "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.
"We will direct that the matter be reheard before a different judge."
Robinson, whose real name is Stephen Yaxley Lennon, will attend the Old Bailey for the hearing, conducted by the Recorder of London, "as soon as reasonably possible".
Analysis: By Dominic Casciani, BBC home affairs correspondent
This morning, the Lord Chief Justice's ruling in Robinson's appeal underlined that the rule of law - the rules that apply to us all - must be applied fairly in all circumstances.
And that's why the Court of Appeal ruled that Robinson's second conviction in a year for contempt of court was flawed. In essence, the five hours from arrest to sentence at Leeds Crown Court was rushed.
Robinson wasn't told what specific parts of his activity at the court had been potentially prejudicial to a jury - meaning nobody to this day knows exactly what he did wrong.
Further, he immediately removed the offending video from Facebook on the court's order and the judge should have then adjourned the matter to give him longer to prepare a defence.
Tommy Robinson is still convicted of contempt in relation to his behaviour at Canterbury last year where he received his three month sentence for potentially derailing a fair trial.
Today, the Court of Appeal said that very same right to a fair hearing means Robinson should have a full opportunity to put his case without rushing to judge.
The case that brought Robinson to Leeds related to grooming and the second of three trials involving 28 men. The third trial is due to start in September.
Footage, filmed by Robinson on a mobile phone and broadcast on social media, saw him discussing the criminal trial that was subject to reporting restrictions.
The video, lasting about an hour-and-a-half, was watched 250,000 times within hours of being posted as a Facebook Live.
A statement from Robinson's solicitors said: "The rule of law and right to a fair hearing are fundamental to every individual and this ruling is an example of the safeguards of our system.
"What makes the British system so unique is the ability to set aside personal feelings and deal with the law and each case on its merits."
Robinson had challenged two contempt of court findings but Lord Burnett said a suspended sentence he was given relating to a trial in Canterbury in May 2017 should stand.
He was given 10 months for contempt of court in Leeds and a further three months for breaching the suspended sentence handed to him in Canterbury.
What is contempt of court?
Contempt of court laws are designed to protect the rule of law, ensure fair trials - and avoid trial by media.
Contempt can be committed by a broad range of people and organisations including the press, jurors, and social media users.
The maximum sentence for contempt of court is two years' imprisonment, but it can also be punished with a fine.
The law on contempt is set out in case law and the 1981 Contempt of Court Act.
Key areas that amount to contempt include:
- Publishing anything that creates a substantial risk of seriously prejudicing "active" criminal proceedings
- Bringing into a court building a device for recording sound
Taking photographs or film in a court building is capable of being a contempt of court.
Breaching a court order or undertakings given to the court can also amount to contempt.
Robinson attended Canterbury Crown Court during a rape trial of four men and filmed on the steps of the court and inside the building while the jury was considering its verdicts.
At an earlier hearing, Robinson's QC argued that procedural "deficiencies" had caused "prejudice" in Leeds.
Lord Burnett said the judge should not have commenced contempt proceedings the same day he was arrested.
He explained "no particulars of the contempt were formulated or put to the appellant", and there was "a muddle over the nature of the contempt being considered".
Robinson's bail conditions order that he does not "approach within 400m (0.2 miles) of Leeds Crown Court".
His lawyers had argued that a rehearing was not necessary due to the length of time he served in prison.
But the Court of Appeal said the "alleged contempt was serious" and the sentence might be longer than that already served.
Rival groups of Robinson supporters and "Stand Up To Racism" protesters had gathered outside the Royal Courts of Justice and swapped chants.
Both groups of about 30 people were outnumbered by watching police.
BBC White House reporter, Tara McKelvey, said his case has generated "a united front among nationalists" from across the Atlantic, with Robinson gaining support from the likes of Steve Bannon and Donald Trump Junior.
Who is Tommy Robinson?
Born in 1982, Tommy Robinson, whose real name is Stephen Yaxley-Lennon, describes himself as "a working-class man from Luton".
- Aged 20, he joined the far-right British National Party but soon left saying "it was not for me"
- In 2009 he set up the English Defence League (EDL) - an organisation set up to counter what its members saw as the threat of Islamist extremism
- The EDL organised street marches and demonstrations which often clashed with anti-racism campaigners
- He married in 2011 and is the father of three children
- He left the EDL in 2013 expressing concern that he no longer felt he could keep extremist elements within the organisation at bay
- In 2015, he joined demonstrations with the German anti-immigration group Pegida, Patriotic Europeans Against the Islamisation of the West, and announced the founding of the British chapter
- In 2017, he started contributing to Canadian-based far-right political commentary site The Rebel Media