Mahmood was found to have traces of explosives in his baggage when he returned to the UK through Manchester Airport in 2011, the Old Bailey heard.

He and Dart had discussed UK targets, including Wootton Bassett.

The Wiltshire town was where the bodies of troops killed in Iraq and Afghanistan passed through.

'Silent conversations'

Dart, 30, was from Weymouth, Dorset, and lived in Ealing, west London; Mahmood, 22, was from Northolt, west London, and Alom, 26, lived in Stratford, east London.

Mahmoud has admitted he had been trained in bomb-making at a terrorist training camp in Pakistan.

Prosecutor Jonathan Laidlaw QC said that in the summer of 2011 the three men "had spoken not just of terrorist operations in Pakistan but also of the possibility of carrying out terrorist attacks in this country".

The court heard how the men had discussed terrorism in "silent conversations" by typing messages into a Word document on Dart's laptop computer, while the others looked on.

They then deleted the text, but police were able to retrieve fragments of the messages when they seized the laptop.

One of the "silent conversations" between Mahmood and Dart was about Wootton Bassett.

They also talked about the ingredients needed to make homemade bombs, and Dart asked Mahmood about getting contacts for the Pakistan Taliban, Tehrik-i-Taliban Pakistan, which was banned in the UK in 2011.

Mr Laidlaw told the court that the defendants "plainly were under the misapprehension that the text once deleted could never be recovered."

'Anti-surveillance training'

The tactic suggested that they were aware that they might be under surveillance, the court heard.

Mr Laidlaw added: "It is obvious, suggest the prosecution, from the covert method of communication employed that they were surveillance conscious and had received anti-surveillance instruction or training.

"They knew that their activities were likely to be of interest to the authorities and that ordinary conversation within their homes may be recorded by listening devices."

On another occasion MI5 officers followed Dart and Mahmood as they met in Ealing. Dart was overheard saying "things have to be done. It doesn't matter even if you're in this country or abroad, things have to be done."

It was emerged that Alom, who used to work as a police community support officer, had previously been a member of the Territorial Army, serving with G Company, 7th Battalion of the Rifles, based in West Ham.

Mr Laidlaw said: "During his service he had expressed the wish to go to Afghanistan to undertake peace-keeping duties."