BAGHDAD (Reuters) - A Russian Islamic State fighter was sentenced to death by hanging in Iraq on Tuesday, authorities said, a rare conviction of a foreign militant on terrorism charges.

The unnamed man was captured after running out of ammunition in western Mosul, a spokesman for Iraq’s Supreme Judicial Council said in a statement.

“The Russian was a member of Daesh operating in Mosul since 2015,” he added, using an Arabic acronym for the Sunni Muslim militant group.

Thousands of foreigners have been fighting for Islamic State in Iraq and Syria.

Security and aid officials told Reuters over the weekend that Iraqi authorities were holding 1,400 foreign wives and children of suspected militants - most from Turkey, others from former Soviet states including Tajikistan, Azerbaijan and Russia.

Iraqi forces, backed by U.S.-led coalition allies and Kurds, retook Mosul in July following the group’s occupation of the country’s second largest city in 2014.

The Sunni militant group still controls territory in Iraq and is expected to revert to more conventional insurgent tactics such as bombings as its self-proclaimed caliphate falls apart.