LONDON (AP) — The terror plot involved targeting British reserve troops using a toy-car packed with explosives.

But investigators said Thursday Britain's domestic spy agency of MI5 and police were able to stop Zahid Iqbal, Mohammed Sharfaraz Ahmed, Umar Arshad and Syed Farhan Hussain before they could launch the deadly attack.

Iqbal and Ahmed were given extended sentences of 16 years and 3 months, which means they will be in jail for more than 11 years and put on parole for the rest of the time. Arshad was sentenced to more than six years in jail, while Hussain received more than five years.

The British men — aged between 22 and 31 — pleaded guilty in March to engaging in conduct in preparation for acts of terrorism.

The four were arrested a year ago in the town of Luton, north of London, after an operation by police and the MI5.

Prosecutors said the Britons downloaded files containing instructions for an attack, bought survival equipment and collected money for terrorist purposes. They also admitted "facilitating, planning and encouraging" overseas travel for terrorist purposes.

The men were recorded discussing sending a remote-controlled toy car carrying a homemade bomb under the gates of an army reservist center in Luton and speaking of using instructions in an al-Qaida manual to make an improvised explosive device.

"Using a toy-car as an explosive device may seem childish, but if they had succeeded in pulling this off, the consequences could have resulted in deaths and injuries, much like we have seen in recent days in Boston," said a British security official with knowledge of the investigation and who spoke on condition of anonymity because he was not authorized to be named.

The court heard that Iqbal had direct contacts with a Pakistani operative and helped Ahmed travel to Pakistan in 2011 for terror training.

Prosecutors also said the men gained inspiration from the 2010 first issue of "Inspire," an online English-language magazine from Yemen's al-Qaida in the Arabian Peninsula and linked to the U.S.-born militant cleric Anwar al-Awlaki. The militant leader was killed in 2011 in a drone strike.

The same online magazine gave instructions on how to build a "pressure cooker" bomb — the same type of explosive device that was used in Monday's attack at the Boston Marathon when three people were killed and more than 100 were wounded.