BAGHDAD (Reuters) - An Iraqi court sentenced a French man and a German woman to life in prison on Monday for belonging to Islamic State, forging ahead with the trial of hundreds of people - many foreigners - captured after the militant group’s defeat last year.

Slideshow ( 2 images )

French citizen Lahcen Ammar Gueboudj, in his 50s, and the German, Nadia Rainer Hermann, 22, had both pleaded not guilty to joining the hardline Islamist group that captured a third of Iraq and swathes of Syria in 2014.

Though Gueboudj and Hermann were tried individually, they were brought out for sentencing with 13 others tried on Monday, crowding the small courtroom.

During Gueboudj’s roughly 30-minute trial, he said he had only come to the region to retrieve his son who had joined Islamic State and had been living in its de facto Syrian capital, Raqqa.

“I would never have left France if my son hadn’t been in Syria,” he told the judge, through a translator, in Baghdad’s Central Criminal Court.

“I know I’m crazy to have gone to Syria.”

Speaking to Reuters in French through the bars of a holding cell outside the courtroom before he was sentenced, a disheveled Gueboudj said he had signed papers he had not understood were a confession during the investigation.

Hermann and Gueboudj both told Reuters they had spoken to consular staff only once since being detained in 2017. They had court-appointed lawyers present on Monday but had neither met with nor spoken to them, they said. The sentences can be appealed.

Embassy staff and translators from both countries attended Monday’s hearing.

Hermann was sentenced in January to a year in jail for entering Iraq illegally.

Asked by the judge whether she believed in Islamic State’s ideology, she said no. However, she earlier admitted to the judge that she had received a salary of 50,000 Iraqi dinars ($42) per month, which confirmed her membership to the group.

“This whole process is confusing,” Hermann, who wore a blue prison uniform over a black abaya and a grey headscarf, told Reuters before the verdict, speaking in German from the holding cell, in the presence of Iraqi prison guards.

Hermann was the only woman being tried on charges relating to Islamic State on Monday. Iraq has been prosecuting women of various nationalities for months, and was sentencing roughly 10 women a day at the peak of trials in the spring.

Around 20 foreign women, including nationals of Turkey, Germany and Azerbaijan, have been sentenced to death for membership of Islamic State.