A Turkish woman was sentenced to death and 11 other foreign widows to life in jail by an Iraqi court, for their involvement with the Islamic State of Iraq and the Levant (ISIL, also known as ISIS).

The 12 women - 11 Turks and an Azeri, some of whom appeared at the court in Baghdad nursing infants - were convicted on Sunday, despite pleas they had been duped or forced by their husbands to join them in Iraq.

The women, aged between 20 and 50, were all arrested in Mosul or Tal Afar, where their husbands were killed as Iraqi forces recaptured the northern cities from ISIL last year.

Only the woman condemned to death, speaking through an interpreter, acknowledged she willingly travelled to Iraq with her husband and their children.

"We had to leave Turkey because my husband was a wanted man. I wanted to live in an Islamic state where sharia (Islamic law) is the law of the land," she said.

But "I regret having come," said the 48-year-old Turkish woman, whose husband and two sons were killed in air attacks.

She broke down in tears, while another Turk almost fainted.

Duped?

The state-appointed defence lawyers argued the women had all been duped into coming to Iraq and were not involved in any acts of violence.

But they were found guilty under Article 4 of Iraq's anti-terrorism law against "any person who commits, incites, plans, finances or assists in acts of terrorism", and for illegal entry into the country.

"I got to know my husband through the internet. He proposed we meet in Turkey, but an intermediary there told me he would drive me to my future husband, without saying where," said Angie Omrane, the Azeri woman.

"I thought we were staying in Turkey, but I found myself in Syria and then my husband took me to Iraq."

Leila, one of the Turkish women, said: "My husband forced me to come to Iraq by threatening to take away my two-year-old son if I didn't follow him. I didn't take part in any violent action. I stayed at home the whole time."

A judicial source said the sentencing of the women by a three-judge panel had followed weeks or even months of questioning. They have one month to lodge an appeal.

A total of 509 foreign women, including 300 Turks, are being held in Iraq, with 813 children, a security source told AFP news agency.

Germany's ISIL teen

German media, citing judicial sources, reported on Sunday that a German teenager identified as "Linda W" was sentenced to six years in prison for her involvement with ISIL.

The seventeen-year-old travelled from Germany to Iraq via Turkey and Syria in mid-2016 and married an ISIL fighter from Chechnya.

She expressed regret at joining ISIL, in an interview after her arrest in Mosul last summer.

"I want to go home to my family. I want to get out of the war, away from the weapons, the noise. I don't know how I came up with such a dumb idea. I've completely ruined my life," she said.