Ringleaders Iqbal and Ahmed were given extended terms of 16 years and three months, including 11 years in jail.

Arshad was jailed for six years and nine months and Hussain for five years and three months.

Sentencing the men, Mr Justice Wilkie QC said that Iqbal and Ahmed posed a continuing risk to the public.

Their extended sentence comprises 11 years in jail and an additional five years on licence after release, during which they could be recalled to prison.

'Particularly dangerous'

The judge said: "In each of their cases, their persistent commitment to terrorist activity, in a number of different ways, over a significant period of time and, in each case, their willingness to take practical steps to obtain terrorist training abroad, marks them out as particularly dangerous.

Analysis

By Dominic CascianiHome affairs correspondent

Mr Justice Wilkie noted that Iqbal and Ahmed knew they were under suspicion yet they continued to seek out extremist material consistent with their original plans.

And it's because of that apparent determination to plough on that the judge gave the men extended sentences.

Judges can turn to these sentences when they assess that an offender is so dangerous they may commit a further serious crime after release.

In effect, extended sentences partially bridge the gap between ordinary fixed jail terms and life sentences, under which serious criminals live out their days knowing their release licence can be withdrawn at any time.

Iqbal and Ahmed face five extra years at the end of their 11-year sentence, during which they could be sent back to jail if they have not changed.

Both men will have to tell police regularly about their whereabouts for 30 years.

"This, coupled with the fact that, after their houses had been searched, and they were obviously under serious suspicion, they nonetheless continued to access material consistent with the mindset which informed their previous preparatory activities, persuades me that they continue to be 'dangerous' to such a degree that I should exercise my discretion to pass an extended sentence."

Mr Justice Wilkie said that while the men would be eligible for release after serving two-thirds of their sentence, the Parole Board would have the power to keep them in jail for the whole 11 years.

The four men were arrested in April 2012 and pleaded guilty at Woolwich Crown Court to engaging in preparation for acts of terrorism.

The court heard that Iqbal, 31, Ahmed, 25, Hussain, 21, and Arshad, 24 had arranged terrorism training in Pakistan, debated obtaining weapons and how best to raise funds for their plans. Their conversations were secretly recorded in a joint police-MI5 operation.

In one of the secretly-recorded conversations which was played to the court, Iqbal, the group's leader, can be heard telling Ahmed: "I was looking and drove past like the TA centre, Marsh Road. At the bottom of their gate there's quite a big gap. If you had a little toy car it drives underneath one of their vehicles or something."

In another recording, the men discussed how to make a homemade bomb, based on instructions available in an English-language jihadist magazine.

'Smiling and giggling'

As the tapes were played in court, the four men had sat smiling and giggling in the dock.

Deputy Assistant Commissioner Stuart Osborne of the Metropolitan Police's Counter Terrorism Command said: "The actions and intentions of these men starkly demonstrate what we have repeatedly said - that terrorists live among us while they carry out their plans, doing all they can to conceal their activities.

"We need the help of all our communities to come forward with information about such behaviour or activity so that we can arrest and charge individuals who have violent, extremist views and pose a danger to the public."

The men had prepared for a terrorism training camp hidden in the mountains of Pakistan by joining physical training exercises in Snowdonia and the Brecon Beacons.

But their lawyers said that although the men had pleaded guilty, they did not pose an imminent threat to people in the UK.

They said it was an overstatement to suggest the men had made genuine plans and the toy car idea had gone nowhere.