COPENHAGEN, Denmark — Four men acquainted with a gunman who killed two people in Copenhagen were acquitted of abetting terrorism Tuesday. Two of them, however, were convicted of illegal arms possession.

Copenhagen’s City Court cleared Bhostan Khan Hossein, 26; Liban Ahmed Saleban Elmi, 20; Ibrahim Khalil Abbas, 23; and Mahmoud Rabea, 31, of abetting Omar El-Hussein in the attacks last year.

Hossein and Elmi were found guilty of illegal arms possession for disposing of the M-95 assault rifle El-Hussein used on Feb. 14, 2015, to kill a Danish filmmaker and wound three police officers. They were given three and two-and-a-half years in prison, respectively

The next day, El-Hussein opened fire outside Copenhagen’s main synagogue, killing a Jewish guard and wounding two police officers before being killed during a shootout with a SWAT team.

Justice Minister Soeren Pind tweeted after the verdict, “Hmm… the prosecution was not successful. Now we must take a close look at the verdict and then we will see whether to appeal.” In Denmark, the defense and prosecution have two weeks to ponder whether to appeal a court ruling.

All four had pleaded not guilty in a trial held amid tight security.