The German national was captured by Iraqi forces during the battle for Mosul last year, the spokesman said, declining to identify her.
She can appeal the sentence, said Abdul-Sattar Al-Birqdar, spokesman for Iraq’s Supreme Judicial Council in Baghdad.
“She confessed that she traveled with her two daughters from Germany to Syria and then joined Daesh in Iraq,” Birqdar said. The woman was convicted of participating in attacks on Iraqi security forces and offering the militant group logistical support, said Birqdar.
Thousands of foreigners have been fighting for Islamic State in Iraq and Syria.
Iraq declared victory last month over Daesh, which had seized control of nearly a third of the country in 2014. However, the group continues to carry out bombings and other attacks in the country.
Separately, Iraq’s Supreme Federal Court on Sunday ruled against calls by Sunni and Kurdish lawmakers to delay a parliamentary election, expected to be called for May, to allow hundreds of thousands of people displaced by war to return home.
Shiite politicians, including Prime Minister Haider Abadi, argued delaying the election would be unconstitutional.
The election must be held “within the timeframe provided by the constitution,” the court said in a statement.
Parliament is expected to meet on Monday to validate May 12 as the date for the ballot, as suggested by the government, or agree another date in May.
Abadi is seeking re-election, building on a surge in his popularity among Iraq’s majority Shiite Arab community after leading the three-year fight against Daesh militants, supported by a US-led coalition.
“Postponing the elections would set a dangerous precedent, undermining the constitution and damaging Iraq’s long-term democratic development,” the US Embassy in Baghdad said in a statement on Thursday.
The US had shown understanding for Abadi’s move in October to dislodge Kurdish fighters from the oil rich northern region of Kirkuk, even though the Kurds are traditional allies of Washington and played a key part in the war against Daesh.
Tens of thousands of Kurds were displaced as a result of the takeover of the ethnically mixed areas of Kirkuk and its surroundings by Iraqi forces supported by Iranian-backed paramilitary groups.
Rouhani aims for better ties with Iraqi Kurds
Iran’s President Hassan Rouhani on Sunday called for boosting relations with the Iraqi Kurdish region as part of a united Iraq, Iranian media reported, after ties were strained over an independence referendum in the area last year.
The call came during a visit by the semi-autonomous Kurdistan region’s Prime Minister Nechirvan Barzani, the first such high-level trip to Iran since last year’s Kurdish independence referendum which Iran strongly opposed.
The Kurdish referendum on Sept. 25, which produced an overwhelming “yes” for independence, angered Iraq’s central government and neighbors Iran and Turkey, which have their own restive Kurdish minorities.
“President Rouhani stressed the historical and deep-rooted ties between the Islamic Republic of Iran and the Kurds of Iraq, and said all efforts should be made to strengthen the close relations between the two nations of Iran and Iraq,” the state news agency IRNA reported.