Kim Hjelmgaard

USA TODAY

BERLIN — A 12-year-old boy twice failed to denote explosives in the southern German city of Ludwigshafen, local media reported Friday.

Focus magazine reported the boy was born in Germany to Iraqi parents and had been "religiously radicalized," possibly by someone with ties to the Islamic State. Federal prosecutors are investigating but have not confirmed any Islamic State links.

The magazine said the boy tried initially to set off a nail bomb at a Christmas market. When that didn't work, he left explosives in a backpack near a building that houses a shopping center and government office. Nobody was injured in either incident.

Focus did not know what materials were used or why both bombs failed to detonate. The magazine said there were indications that the boy, who falls below the age of criminal responsibility in Germany, may have thought about traveling to Syria to join Islamic State militants. German social workers, with his parents' consent, are holding him while an investigation takes place.

Germany has taken in more migrants and refugees from conflict zones such as Iraq and Syria than any other European country over the last two years. It has seen a number of small-scale terror-related assaults but it has so far managed to avoid high-profile attacks such as have occurred in Belgium and France.

The State Dept. warned U.S. citizens in an alert late last month that they "should exercise caution at holiday festivals, events and outdoor markets" throughout Europe during the holiday season because of the heightened risk of terrorist attacks.

European security agencies believe the Islamic State is currently developing new tactics to strike at the West including kidnapping and car bombs.