Six Islamist extremists admit planning a bombing attack on a rally organised by the far-right English Defence League.
The plot, involving a nail bomb, a partially assembled pipe bomb, shotguns, swords and knives, failed because the rally in Dewsbury ended earlier than planned.
It was only uncovered after a car used by two of the men was found to be uninsured and was searched after being impounded.
At London’s Woolwich crown court, Jewel Uddin, Omar Mohammed Khan, Mohammed Hasseen, Anzal Hussain, Mohammed Saud and Zohaib Ahmed admitted preparing an act of terrorism between 1 May and 4 July last year.
Police and security services had no intelligence about the planned attack on 30 June 2012, but one of the plotters was under surveillance in relation to another terrorist plan.
The nail bomb, containing 458 pieces of shrapnel, was an 18-inch rocket which had been powered by explosives taken from at least two large fireworks.
Police estimated there could have been up to 750 EDL marchers at the Dewsbury event, along with dozens of officers and passers-by.
The fanatics’ plan failed by chance, because they arrived at 4pm when the rally had dispersed by 2pm.
The planned attack was only uncovered because a traffic officer stopped Uddin and Khan on the M1 as they travelled back to their home town, Birmingham.
He made checks on their Renault Laguna, which came up as being uninsured, and the car was impounded.
Our Home Affairs Correspondent Simon Israel writes:
This could have been the start of a war between extremists, jihadists vs far right.
Police, security services and senior government officials have been agitated for some time about the impact of English Defence League demonstrations on Muslim communities.
This plot was uncovered by chance, a traffic stop on the M1. One can only wonder about what might have been the consequences if the EDL march had not wound up so early or if the jihadist plotters had not arrived in Dewsbury so late in the day.
Police say it is over the top to suggest there's a war going on, and community leaders in Birmingham while fearful of the EDL do not condone those convicted for taking up arms against the far right
It was only two days later that staff at the pound near Sheffield looked at the contents of the Renault and found the gang’s arsenal.
There were also 10 copies of a hate-filled note addressed to the enemies of Islam, the Queen and David Cameron.
It said: “This is a message to the enemies of Allah and his messenger. This is a message to the kafir (non-believer) female devil and self-proclaimed Queen Elizabeth and her accursed jubilee, fooling a nation of blind sheep to your self-proclaimed royalty and majesty.”
The document addressed the EDL directly, saying: “To the EDL (English Drunkards League). O enemies of Allah! We have heard and seen you openly insulting the final Messenger of Allah… you should know that for every action there is a reaction.
“Today is a day of retaliation (especially) for your blasphemy of Allah and his Messenger Muhammad. We love death more than you love life. The penalty for blasphemy of Allah and his Messenger Muhammad is death.”
CDs of speeches by radical preacher Anwar al-Awlaki were also found.