AFP reports that the four men had been charged with "terror offences" for allegedly providing support for the gunman, Omar Abdel Hamid El-Hussein, ahead of the second attack, which took place outside a synagogue. Their actions were "not of such a character that the actions can lead to a conviction for complicity," the verdict read.
Omar Abdel Hamid El-Hussein carried out two attacks on February 14th 2015. He first fired 28 shots into a cultural centre in Copenhagen where Lars Vilks and others were attending a conference on free speech. One person was killed before the gunman went on to kill a Jewish security guard outside the Copenhagen synagogue.
Omar Abdel Hamid El-Hussein was later shot to death outside his home after opening fire on the police. A total of five police officers were killed in the attacks.
This case has seen one of the largest police investigations in Danish history and most observers think the decision will be appealed.
AFP cited the assistant prosecutor in the case, Sidsel Klixbull, who wrote in a statement: "We are surprised that the court has judged the evidence against the accused differently than the prosecution has." Danish justice minister Søren Pind wrote on Twitter that authorities would "study the verdict and see whether to appeal".