"The prosecutor proved that the accused had taken it upon themselves and decided with the Somali islamist militia al-Shabaab to commit terrorist crimes in the form of suicide attacks," the court said.
Prosecutor Agnetha Hilding Qvarnström had sought a sentence of three years each for Mohamoud Jama, 22, and Bille Ilias Mohamed, 26, who were arrested in Gothenburg and Stockholm in May and June this year following an investigation by the Swedish security police.
The two men are suspected of having plotted suicide attacks in Somalia, with the aim of "murder" or "maiming" a large number of people and causing "massive damage to property," the charge sheet said.
The prosecution based its case on interrogations of the two suspects, witness accounts and a long line of tapped telephone conversations, claimed to have proof the two men had been in contact with al-Shabaab leader Yassin Ismail Ahmed.
The recorded telephone conversations also showed that Mohamed had attended an al-Shabaab training camp in Somalia and that he aimed to "return to Somalia and wanted to become a martyr," while Jama "was preparing for a future suicide mission," the charge sheet said.