A German of Iranian origin who traveled to Syria to join a jihadist group was sentenced to two years in prison for appearing in a set of images with severed heads of Syrian army servicemen. The case marks the first Syria-related war crime verdict in Germany.

A regional court in Frankfurt has found Aria Ladjevardi, a 21-year-old German citizen, guilty of war crimes for treating two Syrian army soldiers “in a degrading and humiliating manner” in violation of international humanitarian law.

The unidentified militant group, to which Ladjevardi is said to have belonged, raided a Syrian army checkpoint between March 8 and April 16, 2014, in the town of Binnish located in the Idlib province. The militants captured and later executed two servicemen. In course of the slaughter they beheaded the victims and spiked their heads on metal rods put on public display, the court has stated in a statement Tuesday.

The man, who is believed to have spent at least three weeks within the group ranks after he left Germany for Syria in spring 2014, was subsequently photographed along a fellow jihadist identified as Vedat V. at the scene who posted one of the images on Facebook for everybody to see.

“The accused posed with the dismembered heads and let himself be photographed three times, so as to mock and belittle the deceased, whom he considered ‘dishonorable infidels,'” the court statement reads.

Vedat V. has been taking part in Syrian military conflict on the side of the armed opposition fighting Syrian government since 2012.

Ladjevardi, who has been in custody since his arrest by German authorities in Frankfurt area in 2015, repeatedly denied complicity in the crime while saying he was intimidated into posing for disturbing images.

“I didn’t want to be in the photograph,” he told the court at the onset of the proceedings in May. The suspect also denied he was a party to killings saying the mutilated bodies were discovered by a local villager who then drew attention of other residents. He alleged that as onlookers started taking pictures of themselves with the ‘find’, he was forced to follow the suit.

“We were in a war zone. I did what I had to do in the situation,” he said, claiming he never knew the images would surface on social media.

Speaking about his desire to join jihadist cell in Syria, he said he allegedly “wanted to help people” after turning his own life around by quitting alcohol and cannabis thanks to Islamic teaching and sport.

While the Islamist acknowledged he had undergone a weapons training in Syria, he dismissed accusations of him being an active member of any jihadist group.

However, despite Ladjevardi’s assertions that he never wanted the pictures be taken, the harrowing photos were found on his slain friend’s sister computer in the Frankfurt Region. The friend, identified as Moed J., is believed to be killed in Syria.

The same photos the investigators found saved on the militant’s mother’s mobile phone.

The trial against Ladjevardi made headlines in Germany as the first process involving war crime charges against a militant who participated in the Syrian protracted military conflict.

Apart from this case, some 10 similar cases involving suspects who are being charged with war crimes committed in Syria and Iraq are awaiting trial in Germany.