Former EDL leader and anti-Islam cheerleader Tommy Robinson was jailed this week after a court ruled that he potentially prejudiced a trial.

An hour-long Facebook Live rant, outside a rape trial at Leeds Crown Court, led to the 35-year-old (real name, Stephen Yaxley-Lennon) pleading guilty to a charge of contempt of court. He was jailed for three months for breaching the terms of a current suspended prison sentence, and ten months for the contempt of court – 13 months in total.

What started as a social media shitstorm turned into a full-on frenzy: the hashtag #FreeTommy started gaining traction, not only among Tommy's acolytes in the UK, but as far as Australia and the US. Then it started to trend. People you've ignored since changed their profile photos to Tommy's face. The American alt-right, triggered by his imprisonment, bleated that "free speech is now a crime in the UK". Alex Jones, manic and objectively wrong as ever, said the situation was "mind-blowing", before likening the judge in the case to Judge Dredd.

Two days after his sentencing, the social media circus continues. So I thought – for the benefit of Alex Jones, the entire alt-right and everyone on your Facebook feed with very strong feelings about halal butchers – what exactly "contempt of court" is, and why Tommy has been jailed for it.

"The law of contempt of court is a fundamental aspect of the English legal system, designed to protect the right to a fair trial," Athalie Matthews, a media lawyer at law firm Withers Worldwide, told VICE. "If you think of a court as a 'shrine' to the law, the law of contempt is there to ensure that what takes place in the shrine – deciding whether a person is guilty or not guilty of a crime – is not unfairly influenced by things said or written outside it."

But Matthew Harding, defending Tommy in court, claimed that although his client had "deep regret", he "did not try to cause difficulties for the court process". So why is he going to be waking up on a HM Prison Hull bed tomorrow morning?

"Mr Robinson filmed himself and people involved in the trial outside the court building while the trial was going on, published it on Facebook Live and encouraged others to share the video," Athalie explained. "The judge found that this created a substantial risk that the course of justice in the trial would be seriously impeded or prejudiced."

Just to be sure, I asked another media law expert – Andrew Scott, Associate Professor of Law at the London School of Economics and Political Science – who said exactly the same thing. "The basic purpose of contempt of court is to avoid, deter and ultimately to sanction against the interference with legal proceedings," he explained. "The fundamental purpose of the court is to achieve justice in individual cases. Injustices might be occasioned if someone is on trial and has their case prejudiced."

An example of that happening? "There was a case involving Lee Bowyer and Jonathan Woodgate [former Leeds United football players] who got themselves involved in a fracas with another couple of lads on a night out," Scott recalled. "They were prosecuted for their involvement, but during the trial the Sunday Mirror published an interview with the father of one of the victims of the violence. He introduced the suggestion that there might have been a racial motivation to what happened; that idea had been specifically excluded for consideration of the court. Therefore, the judge took the view that the new detail potentially prejudiced the minds of the jury members, so they stopped the legal proceedings."

With the collapse of the first trial of that case, the whole thing ended up costing an estimated £15 million, according to the Guardian. The judge in Tommy's case claimed that his actions had the potential to derail the trial, in which case a retrial would cost "hundreds of thousands of pounds".

So, let's get some facts about the #FreeTommy thing straight: Tommy is not Nelson Mandela, speaking truth to power. He's not the leader of the free press. He's certainly not a martyr in any way, shape or form. He appointed himself "a journalist", but apparently didn't even bother to research basic media law. He's not a victim of political policing. There's no conspiracy against him; no elaborate plot involving a collaboration between various institutions, the mainstream media and hordes of left-leaning social media users to curtail his free speech. He has not been jailed for criticising Islam.

The law applies to Tommy Robinson as much as it does to anyone else. Just because people like him for talking shit about Islam, doesn't mean he should be allowed to sabotage a criminal trial.

If he was, the following could happen: i) A retrial would cost the tax payer a load of money; ii) It would allow Tommy to continue to entrench social divisions, by highlighting crimes committed only by Muslims; iii) And – most importantly – it would prolong the suffering of the vulnerable victims in this important criminal trial.