Frenchman Lahcen Gueboudj, 58, and a German woman whose name was given only as Nadia were sentenced separately at the Baghdad central criminal court, according to an AFP journalist.
The French defendant refuted earlier statements in which he purportedly admitted to pledging allegiance to IS and undertaking training with the jihadists.
“I signed confessions in Arabic without knowing what was written,” said Gueboudj, with short grey hair and stubble, wearing a brown prison uniform.
“I would never have left France, if my eldest son Nabil, 25-years-old, hadn’t gone to Syria,” he said in French.
“I wanted to convince him to return with us to France,” added Gueboudj.
The French citizen had travelled with his wife and children to Turkey before entering Syria, telling the court he was detained by Syrian rebels and transferred to Iraq by US forces.
Nadia’s mother, a German woman of Moroccan origin, was sentenced to death in January for IS membership but the sentence was later commuted to life, which in Iraq is equivalent to 20 years.
The mother and daughter were arrested in July 2017 in Mosul, the jihadists’ former de-facto capital in Iraq where the government declared victory over IS in December last year.
Wearing a black abaya in court, Nadia said she travelled from Syria to Iraq “to run away from the people of IS”.
Speaking in German with a few Arabic words, she said she travelled to Syria from Turkey with her mother, her daughter Yamana and her mentally disabled sister who was killed in a bombardment.
Nadia’s lawyer stressed that she was a minor at the time and that her marriage to an IS jihadist in Syria was “not a decision taken by an adult in full conscience”.
A number of Europeans have been jailed in Iraq for IS membership since the collapse of the jihadists' self-declared “caliphate”.
French women Djamila Boutoutaou and Melina Boughedir, who were given 20-year life terms earlier this year, both said they had been tricked by their husbands.
In May, Belgian jihadist Tarik Jadaoun, also known as Abu Hamza al-Beljiki, was sentenced to death by hanging. He pleaded not guilty to a range of terrorism-related charges.