The four men, who were arrested in a joint Danish-Swedish police operation at the end of 2010, pleaded not guilty to the charges, though one of them had pleaded guilty to illegal possession of weapons.

They were found guilty on the main charge of terrorism, but acquitted on two charges of weapons possession for technical reasons, court officials said.

Judge Katrine Eriksen told the court the target of the planned attack was the offices of the newspaper Jyllands-Posten, which first published the dozen cartoons seven years ago.

"The court finds it proven that the purpose of the trip to Copenhagen was an action against Jyllandsposten/Politiken in Copenhagen which ... was intended to kill people," the court said in its verdict.

The court ordered the men to be expelled from Denmark after they serve their sentences and to pay the trial costs.