Updated

A Syrian refugee has been convicted by a German court of collecting components to make bombs with the intent of carrying out attacks in Denmark.

The dpa news agency reported the 21-year-old, whose name wasn't released, was convicted in Ravensburg state court of preparing an act of violence and sentenced to 6 1/2 years in prison.

The man was arrested in November with 17,000 matches, a package of fireworks, 17 batteries, six walkie-talkies and two kitchen knives and was trying to make his way into Denmark.

The court said he had come to Germany in 2015 and become radicalized after his arrival, and was strongly influenced by Islamic State propaganda.

It said he planned an attack involving many bombs in Copenhagen that he hoped would cause multiple casualties.