According to the man's indictment, he posted videos to Facebook that were produced by the terror group Isis and showed scenes of murder.
In comments posted along with the videos, the man wrote threats in English and Arabic that targeted “infidels” “lapsed [Muslims]” and “spies”.
According to the indictment, the man wrote, among other things: “The knife will hit all of you and your heads will roll in the streets. You cannot hide from us.”
According to broadcaster DR, the man's lawyer argued that the video and comments were posted in a closed Facebook group with only 11 members. The lawyer argued unsuccessfully that the posts were not meant to create fear amongst the general public.
The 19-year-old is a Danish citizen with a Lebanese background. DR reported that the man said his posts were meant to send a signal to those who insult Islam.
The 19-year-old was charged under Denmark's terror laws at the request of Justice Minister Søren Pind.
“In recent years, we have seen a powerful increase in propaganda online that sympathizes with terrorists. We cannot accept that. It's important that the authorities are vigilant and ensure that these types of threats are met with consequences,” Pind said in a statement earlier this month.
Public prosecutor Jan Reckendorff had described the case against the 19-year-old as “unusual”.
“It has only happened very rarely that the public prosecutor's office has filed charges against a person for threatening terror. The public prosecutor believes that the 19-year-old's serious threats on Facebook were made with the intention of seriously frightening the public,” he said.
The prosecuting attorney in the case, Torben Thygesen, said the court's decision sends an important message.
"This shows that one must be aware that what they put on the internet, and these kinds of statements, can have consequences," he told DR.
The man's lawyer advised his client to appeal against the decision but the 19-year-old opted to accept the punishment. The teen was also ordered to pay the costs of the court case.