Four young men plotted to murder a police officer or soldier in one or more Islamic State-inspired terrorist attack on the streets of London, a court has heard.
Nathan Cuffy, 26, Nyall Hamlett, 25, Suhaib Majeed, 21, and Tarik Hassane, 22, all from west London, are on trial for conspiracy to murder and preparation of terrorist acts. Some of them are also variously charged with firearms offences.
Prosecutor Brian Altman QC told jurors at the Old Bailey that when police arrested the British Muslims in the autumn of 2014 they scuppered the murderous plans borne out of a "warped ideology".
The plot had already got to the stage where a gun and ammunition had been acquired and there was discussion buying a moped, jurors were told.
Mr Altman said: "With their arrests, the police successfully disrupted a plot to kill a police officer, a soldier or possibly even a civilian, in one or more terrorist attacks, which, if the plot had been allowed to run its course, would have resulted in a terrorist murder or murders on the streets of London."
The defendants were allegedly influenced by events in Syria and Iraq and the rise of Islamic State of Levant which in June of that year had renamed itself Islamic State and pronounced itself as a caliphate.
Hassane had pledged his allegiance to IS and the plot received "important direct and authoritative encouragement" from IS itself in September 2014 in the form of a speech on YouTube from the IS official spokesman, the Old Bailey heard.
In it, Abu Muhammad al-Adnani al-Shami issued a fatwa to kill disbelievers in the West.
Mr Altman went on: "Although the finer details of the plot may not have been worked out and finally agreed upon, the defendants had sufficiently advanced their plans to the point where, the day before the first arrests in late September 2014, they had acquired a self-loading pistol, a magazine with ammunition suitable for use in it and a silencer.
"The evidence suggests that Hassane and Majeed were discussing the purchase also of a moped that could not be traced back to them, as well as a garage to store the moped with the gun.
"They were also trying to source the money to buy the moped. At one stage they spoke about needing to find £2,000."
All but Hassane, who was studying in Sudan, were arrested in September 2014.
On his return, evidence suggested Hassane was pressing on with the plot as a "lone wolf terrorist ".
In the days before his arrest on October 7, he had carried out "hostile reconnaissance" by searching Google Streetview for Shepherd's Bush police station and the Parachute Regiment Territorial Army Barracks at White City, jurors heard.
Mr Altman said: "So the evidence points to this being a plot to kill, a plot to execute a policeman or a soldier or as I say even an ordinary member of the public in one or more assassinations either involving a drive-by shooting or a shooting on foot and then a speedy escape by moped."