A Swedish court has found a 46-year-old man guilty of preparing an attack in Stockholm on behalf of the Islamic State group and sentenced him to seven years in jail.

The Solna District Court says David Idrisson, an Uzbek national who has been living legally in Sweden since 2008, should be expelled after serving his time. He was also found guilty of financing the radical Islamic group in Syria.

The court said Friday that Idrisson had gathered some 500 kilograms (1,100 pounds) of chemicals, knives, gas masks and military equipment, and photos of potentials targets in Stockholm were found on his cell phone.

Two other younger men who Idrisson knows and who were also suspected in the case, were acquitted. They were released from detention earlier this week.