The Copenhagen City Court said Lors Doukayev, a 25-year-old citizen and resident of Belgium, will be expelled from Denmark after serving his term.

No one was injured when the bomb exploded in a hotel bathroom on Sept. 10 except Doukayev, who received cuts to his face. Investigators believe it exploded by mistake and he intended to send it to a Danish newspaper that has run a cartoon of the Prophet Muhammad.

Tuesday’s sentencing came a day after Doukayev was convicted of attempted terrorism and illegal weapons possession.