By Dominic Casciani
Home affairs reporter, BBC News
What has happened in the Court of Appeal?
Clockwise from top left: Irfan Raja, Awaab Iqbal, Aitzaz Zafar, Akbar Butt, Usman Malik
The Lord Chief Justice has quashed the convictions of five young Muslim men who last year were jailed for between two and three years on terrorist offences.
In their Old Bailey trial, prosecutors alleged the men had collected extremist material for the purposes of terrorism.
The men, four of whom were at Bradford University, were said to be obsessed with extremist material related to violent jihadi causes.
But did they have any terrorist intentions?
The prosecution had alleged some of them had plans to go to train with militants in Pakistan. These plans were developed through extremist chat rooms and other routes on the net. The men said they had no real terrorism links and were driven by intellectual curiosity.
So how did they come to be prosecuted?
Their case came under what is known as Section 57 of the 2000 Terrorism Act. This is an important law which makes it a crime to possess articles for the purposes of terrorism.
The law has its roots in earlier legislation created to prosecute paramilitaries in Northern Ireland.
In its original form, it aimed to jail people who had gathered target lists or bomb-making instructions - but had no provable specific plot to bring before a jury.
In other words, the police could argue in court that a person's activities were clearly connected with terrorism, even if they were not sure what they were really up to.
How did the new law differ?
This was the issue at the heart of the case of these five young men.
Prosecutors alleged that the type of extremist material and literature the men had collected - vast quantities of it downloaded onto home computers - proved they were dangerous extremists.
Critically, they argued that nobody would download the material unless they had terrorist plans. They said that Section 57 allowed a prosecution on these grounds.
But what did the defence say?
Lawyers argued that the prosecution was flawed because there was simply no proof that the men were immediately connected to a terrorist plot.
In other words, they argued prosecutors had to prove that the material was directly connected to something that was clearly about to happen - rather than something that could possibly happen in the future. The judge ruled out this argument.
What is the justification for the law in this context?
One of the difficult issues in counter-terrorism operations is the question of when to make the arrest.
Investigators need to act to prevent a terrorist plot before it comes close to fruition - but they face a balancing act between public safety and gathering enough evidence.
This is the key justification for Section 57 - it is a law that helps the police stop dangerous people before they come up with a viable plot.
How do you draw the line?
This is what makes this law such a controversial issue. During the appeal, the judges asked the Crown to define what it meant by an article for the purposes of terrorism.
The prosecution said that in this kind of case a plane ticket to Pakistan would constitute an offence - because the ticket could be being used to reach militant fighters.
But the judges disagreed. "The reality is that the phrase [in the law] is so imprecise as to give rise to uncertainty unless defined in a manner that constrains it," said Lord Phillips, the Lord Chief Justice.
What did the Court of Appeal rule?
In their ruling, the three appeal lords said the jury should have been told to decide whether there was a connection between the extremist literature and a clear terrorist plan.
"We doubt whether the evidence supported such a case," said Lord Phillips.
"Difficult questions of interpretation have been raised in this case by the attempt by the prosecution to use section 57 for a purpose for which it was not intended."
Does this ruling have wider significance?
Lawyers say the ruling is a huge blow to the government's counter-terrorism prosecution strategy because it will prevent police from charging people merely downloading extremist material. The appeal judges did not just rule the convictions unsafe - they ruled that the law needed to be curtailed.
Critics, including the men's defence teams, say the law creates "thought crime" because it leads to prosecutions for what people read or collect, rather than what they do.
The Court of Appeal also ruled on the related "Section 58" terrorism law which forms a key part of police powers against alleged militants.
While Section 57 talks of possessing articles "for the purpose of terrorism", Section 58 concerns having information "useful to a person committing or preparing an act of terrorism".
The judges said that Section 58 is a valid charge where a defendant holds information that "calls for an explanation".
However, the charge could not be sustained if the accused could show they had reasonable excuse unrelated to terrorism for having the material.
This could mean someone could argue in court that they were holding the information in relation to other criminal plans - but were not guilty of a terrorist offence.
How many cases could the rulings affect?
There are three other terrorism convictions involving Section 57, but there are a string of other cases involving Section 57 and 58 waiting to come before the courts.
While the facts in each case may differ, the Crown has already conceded the Court of Appeal's ruling could have an impact on those cases.
The government has seven days to appeal the ruling to the House of Lords, but says it needs to debate the issue further with lawyers involved in all these cases.
Should it appeal, there may be delays in all these cases while the highest court in the land considers the issue further.
Does it have significance beyond the law?
The few Section 57 prosecutions to date may have gone largely unnoticed in wider society because the offences are minor compared with other major terrorism trials.
But they have caused great concern in Muslim communities.
Many leading Muslims say that, whatever the government's intentions, these kinds of prosecutions play into the hands of terrorism recruiters who argue that Muslims are under threat.