German prosecutors say they are investigating a case in which a 12-year-old boy allegedly tried to set off a home-made nail bomb at a Christmas market.

Officials said Friday that the German-born boy of Iraqi parents allegedly tried to detonate the bomb at a market in the southern city of Ludwigshafen last month and then planted another explosive device near the city's town hall a few days later.

Focus Magazine, which first reported the case, said the boy is believed to have been radicalized and possibly received instructions from a member of the Islamic State terrorist organization.

Nobody was hurt in either incident. German media report the first bomb, consisting of a jar filled with nails and powder from fireworks, failed to go off, while the second device was spotted by a passer-by who called police. Experts then destroyed the homemade device.

Government spokesman Steffen Seibert said the news is “a startling case to everyone.”

The mayor of Ludwigshafen, Eva Lohse, said the boy is “currently staying at a secure place and therefore presents no public threat.” The child cannot be tried because he is under age 14.

Officials say it is not clear whether or not the home-made bombs could have exploded.

The attempted attack is one of several terrorist attacks in Germany this year, including one in February when a teen-aged girl stabbed a police officer in the neck after suspected contact with Islamic State.