17/12/2016 1:05 PM AEDT | Updated 17/12/2016 1:36 PM AEDT

Boy, 12, Allegedly Tries To Detonate 'Nail Bomb' In Germany

The device failed to detonate, according to media reports.

Axel Schmidt / Reuters

A 12-year-old boy is alleged to have attempted to explode a homemade bomb at a Christmas market in Germany, according to media reports.

The device -- reported to be a nail bomb -- was reportedly destroyed by a police bomb squad after being found in the western German city of Ludwigshafen.

Prosecutors have reportedly said that the 12-year-old left a backpack containing bomb at the market that but the device did not go off because the detonator apparently failed.

"I can confirm that we have started an investigation based on the discovery of a nail bomb in Ludwigshafen," federal prosecutor Stefan Biehl is quoted as saying.

According to reports, the boy has made a number of attempts at detonating the device on different occasions. The explosive device is said to have contained materials from fireworks and sparklers and was not capable of exploding.

The suspect is said to have been born in Ludwigshafen to Iraqi parents in 2004.

The boy is too young to face a German court. He was reportedly held and placed into a juvenile care facility after the alleged attempt to blow up the market.

He is thought to have been radicalised recently by Islamic State.