Six Islamic extremists who pleaded guilty to plotting a bomb attack on an English Defence League rally have been jailed for up to 19 and a half years.
Jewel Uddin, 26, Omar Khan, 27, and Mohammed Hasseen, 23, Zohaib Ahmed, 22, Mohammed Saud, 22, and Anzal Hussain, 24, admitted preparing an act of terrorism between 1 May and 4 July 2012.
The group planned to attack the far-right group using homemade bombs, guns, knives and machetes during a demonstration in Dewsbury, West Yorkshire, on 30 June last year.
The Old Bailey heard that if the men had carried out their attack, it would have sparked a "tit-for-tat spiral of violence and terror".
The men's plans failed only because they turned up to the rally in Dewsbury too late. Their plot was only discovered by police afterwards by "sheer luck" after their car filled with weapons was randomly stopped by officers on the way back from Birmingham. The vehicle was found to be uninsured and was impounded.
Joel Bennathan QC told the court the men's plan was a "reaction to the activity of the EDL".
He said: "The EDL stage rallies in what they perceive to be areas with large Muslim populations. They are intimidating when they do so.
"They are obviously and very deliberately insulting to any Muslims. One doesn't need a degree in theology to have spotted the fact that to a Muslim a personal insult to the Prophet Mohammed is a very serious matter.
"They are intimidating, they are insulting and they are provocative."
After the sentences were handed out, the leader of the EDL Tommy Robinson shouted "God save the Queen" in the court. Supporters of the defendants shouted back "Allah u Akbar" (God is great).
Khan, Uddin and Ahmed were sentenced to 19-and-a-half years each in jail, with a five-year extension on licence.
Hasseen, Hussain and Saud were each sentenced to 18 years and nine months, with a five-year extension on licence.
Judge Hilliard told them: "There is no reason to suppose that a further attempt may not have been made in the future had the defendants not been apprehended. I find it inconceivable that your resolve would have evaporated."
He added: "You intended to engage in a violent confrontation with those attending the EDL rally and use the weapons and the IED (improvised explosive device) to cause serious injuries, and you anticipated that some victims may have died."
Prosecuting, Bobbie Cheema QC told the court: "In the months leading up to June 30, 2012, these six men, all ideologically committed to radical Islam, planned to execute a terrible vengeance on the English Defence League for what they perceived to be the EDL's recent blasphemous words and actions against the Prophet Mohammed and Islam.
"Their plain and now admitted intention was to carry out a terrorist attack using a varied selection of offensive weapons: an improvised explosive device, two sawn-off shotguns, swords and knives.
"As well as members of the EDL and police officers on duty, ordinary shoppers and workers would have been in the town centre at the time of the rally, at the time of the planned attack."
Police said they had no indication the group were planning to carry out the attack but Uddin had been under partial surveillance in relation to a separate attack.
All the defendants except Hasseen had travelled in two cars from Birmingham to Dewsbury on 30 June with an arsenal of weapons hidden in in one car.
Police said they had no evidence at the time linking the group to Pakistan or al-Qaida. Uddin was under minor surveillance on suspicion of being involved in a terrorist plot in Birmingham to "rival the London 7/7 bombings". One of the six defendants, Hussain, is the brother of one of those convicted in that plot.
The sentencing arrived amid fresh tensions between the EDL and the Islamic community in the wake of the murder of Drummer Lee Rigby inn Woolwich and the suspected arson attack on an Islamic centre in Musewell Hill.
Police confirmed that the letters "EDL" were seen spray-painted on the walls of the building. Counter-terrorism police were investigating a possible link.
Four teenagers have been arrested following a suspected arson attack on an Islamic boarding school in Chislehurst in Kent.