The photos posted on Facebook in July 2015, show Iraqi citizen Raed Abdulkareem, 24, who sought asylum in Sweden in October that same year, posing next to a severed head on a plate and decapitated bodies. He claims to have fought for the Iraqi government against the Islamic State group.
The police discovered the photos while investigating Abdulkareem over robbery, for which he is currently serving a prison sentence.
The court said even dead people are protected against violation of "personal dignity" under Swedish law and the Geneva Convention.
“It is satisfying that the district court has made this interpretation, as we also have, of Swedish law in the area. Posing the way this person has done constitutes humiliating and degrading treatment of a protected person. That means it is a war crime,” prosecutor Reena Devgun commented.
The prosecutor added that the judgment is an important one as similar images are common on the internet, and could lead to copycat occurrences in conflicts if not curtailed.
Abdulkareem denied all charges against him, arguing he was forced to pose next to the bodies.
The court ruled Abdulkareem would be deported to Iraq and not allowed to reenter Sweden until 2026.