Updated

A 12-year-old German-Iraqi boy radicalized by the Islamic State is accused of planning to set off a nail bomb at a Christmas market in Germany, according to reports Friday.

The German-born son of Iraqi parents tried to set off the device at the Christmas market in the southern city of Ludwigshafen on Nov. 26 , and again outside city hall on Dec. 5, security sources told Focus magazine.

The boy, who was not named, tried to carry out the attack after being “heavily religiously radicalized” by an “unknown agent” of the ISIS terror group, Focus reported, according to German broadcaster Deutsche Welle.

The boy, who has been taken into youth detention with his parents' consent, apparently had turned rapidly to Islamic extremism, the Associated Press reported.

"This shows how quickly the radicalization of a young person, a child, can take place,"  Stephan Meyer, parliamentary spokesman on security issues for Chancellor Angela Merkel's conservative bloc, told the AP, while confirming details of the report.

In the Dec. 5 attempt, a passer-by spotted the backpack containing the device and reported it to authorities. Inside they found a glass jar packed with material from firecrackers and with nails taped to it, Focus reported. Police said the device would have burned but would not have exploded.

Merkel's spokesman, Steffen Seibert, would not comment on details of the case but said it was a "startling case to everyone, and I think the proper response is to investigate it thoroughly."

German federal prosecutors did not return calls seeking comment.

The Associated Press contributed to this report.