Bilal Abdulla (L) and Mohammed Asha
Two NHS doctors plotted "indiscriminate and wholesale" murder with car bomb attacks on London and Glasgow Airport, Woolwich Crown Court has heard.
Prosecutors say Dr Bilal Abdulla was in a car filled with explosives which rammed the terminal in June last year.
He and Kafeel Ahmed, now dead, are also said to have left cars full of explosive material in central London.
Dr Abdulla, 29, and Dr Mohammed Asha, 27, deny conspiracy to murder and conspiracy to cause explosions.
Prosecutor Jonathan Laidlaw QC told the court that the men were motivated by revenge for how they believed the UK was treating Muslims in conflicts around the world. Prosecutors say Dr Abdulla built the bombs and attacked the targets with Kafeel Ahmed, while Dr Asha played a key role behind the scenes, advising and supporting the plot.
"Their plan was to carry out a series of attacks on the public using bombs concealed in vehicles. No warnings were to be given and the cars were to be positioned in busy urban areas," Mr Laidlaw said.
"These men were intent on committing murder on an indiscriminate and a wholesale scale.
"By the carrying out of a series of explosions, with no warning as to where the next strike would occur, the terrorists knew the public would be gripped by fear. They would not know where the terrorists would strike next."
The trial heard that two remotely-controlled car bombs left in central London in the early hours of Friday 29 June would have killed many young people on a night out.
One of the two Mercedes cars was parked outside the Tiger Tiger nightclub, the other around the corner on Cockspur Street. The cars contained gas cylinders and petrol and large quantities of nails had been added to both vehicles to add to their destructive effect, said Mr Laidlaw.
"The repeated attempts to detonate the vehicles failed but that was not through any lack of effort by the bombers. It was no more than good fortune that nobody died."
The court was told the detonators were connected to home-made mobile phone triggers. Mr Laidlaw said a number of calls were made to the phones in an attempt to set off the bombs but there was not enough oxygen in the cars to make the petrol and gas ignite.
The 30 June attack on Glasgow Airport, the court heard, was a "dramatic change" in plan because of the unexpected failure of the previous day.
The men had two more cars and enough material to make bombs for each. But they also knew that the police would now be on their trail.
The jury heard that Dr Abdulla and Kafeel Ahmed went to their bomb factory on Neuk Crescent, Houston, and loaded a Jeep with gas cylinders and petrol bombs.
From there, they set out on a short journey to the airport to kill both travellers and themselves in a "spectacular" attack on the terminal's busiest day of the year.
Holidaymakers filmed the car jammed in the terminal's entrance doors. It burned furiously, leading to Kafeel Ahmed's death, but failed to explode.
The three men, the court heard, had met while studying in the UK.
Dr Abdulla, an Iraqi citizen born in the UK, was arrested after the burning Jeep failed to detonate. He was a junior house officer at the Royal Alexandra in nearby Paisley.
Dr Asha, a neurologist at University Hospital of North Staffordshire, lived in Newcastle-under-Lyme. He was arrested late that day on the M6 motorway in Cheshire. Indian-born Kafeel Ahmed died from his burns five weeks after the Glasgow attack.
"As the evidence demonstrates, they turned their attention away from the treatment of illness to the planning of murder," said Mr Laidlaw.
"Material found in their possession after their arrests reveals that both men hold or adhere to extreme Islamic belief.
"Despite their professions and their obligations to save life and avert suffering, they both share the same extreme religious and murderous ideology as has inspired other terrorists who have struck at or threatened this country in recent years."
The jury was told the men spent the six months before the attempted attacks buying vehicles, renting a property and making the bombs.
Prosecutors said said Dr Asha's role was a "less obvious and less visible one" - but suggested he was "an important member of this terrorist cell".
Mr Laidlaw said Dr Asha was held in "very high esteem" by Dr Abdulla and paid for some of the vehicles and other materials.
The jury was told Dr Abdulla and Kafeel Ahmed carried out a reconnaissance trip to London in May.
Prosecutors said Dr Abdulla sent a text message and called his co-defendant Dr Asha while in the capital and as he returned, stopping by at his house on the way back to Scotland.
Mr Laidlaw told the court: "After almost anything of significance occurring to Abdulla, sometimes in the company of Kafeel Ahmed, [it] would lead to him making contact with, or visiting, Asha."
He said Dr Abdulla will claim the bombings were only intended to damage property but when jurors consider the evidence they will find such a defence "ludicrous".
The trial was adjourned until Friday.