Germany has remanded in custody a 17-year-old Iraqi suspected of having planned an explosives attack for the Islamic State jihadist group in Germany or Britain, prosecutors said Thursday.

The teenager, identified only as Deday A., hoarded a large amount of pyrotechnics at his home and allegedly planned to use the black powder to make an explosive device, said federal prosecutors.

The suspect, who was first arrested on February 13 in the state of Hesse, faced a judge Wednesday who ordered him remanded in pre-trial custody on charges of having planned an attack.

"The accused is alleged to have procured explosives to commit an Islamist attack in Germany or Britain," the prosecutors said in a statement, adding that he was a suspected member of IS.

German authorities have been on heightened alert since IS claimed a lorry assault on a Berlin Christmas market in December 2016 which killed 12 people.

Dozens of suspects have been arrested or charged over alleged terror plots.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.