BERLIN (AP) — A court in Germany on Tuesday convicted five men for membership in a local cell of the Islamic State group that received orders from a leading IS figure in Afghanistan.

The Duesseldorf regional court sentenced the Tajik nationals, aged 25 to 34, to lengthy prison terms.

The longest sentence of nine years and six months was handed to Sunatullokh K., whose surname wasn’t released due to German privacy rules. He was also convicted of planning to kill a man who had made critical comments about Islam. The attack was foiled by authorities.

The other men, identified as Muhammadali G., Azizjon B., Farhodshoh K. and Komron B., received prison sentences of between 44 months and 8.5 years for membership to a terrorist organization, with some also convicted of involvement in plans to carry out a contract killing in Albania that was later abandoned.

Another man, Ravsan B., was convicted by the same court last year of membership in IS for co-founding the German cell and supporting two planned attacks. He was sentenced to seven years in prison.

Prosecutors said the men honed their military skills in paintball games, and that participants in those included “other people from the Islamist scene” who were in contact with the gunman who killed four people in an attack in Vienna in November 2020. They also allegedly acquired components for an “unconventional” bomb.

Federal prosecutors had sought prison terms of between four and 12 years for the men. Their lawyers had asked the court to acquit them.