Iraqi troops hold a captured Islamic State group flag

An Iraqi court on Tuesday sentenced to death by hanging a Russian man captured in Mosul after finding him guilty of fighting for the Islamic State group, in the first ruling of its kind.

"It is the first time that an Iraqi court sentences to death, by hanging, a Russian jihadist," a judicial source said.

The Central Criminal Court which issued the ruling said the 28-year-old man, who was not named, had admitted to carrying out attacks against the security forces since 2015.

"He belonged to the Zarqawi Brigade, one of the armed wings of the terrorist IS group," said judge Abdel Sattar Bayraqdar.

Jordanian Abu Musab al-Zarqawi led Iraq's main jihadist organisation until his death in a US air strike in 2006.

Iraqi forces detained hundreds of suspected jihadists during the nine-month operation to recapture Mosul, Iraq's second city, which culminated in July. Many more were killed.

They included foreign fighters from a string of Arab and other countries, including Russia, which has faced insurgencies by Chechens and other Muslim groups in the North Caucasus.

Joint Operations Command spokesman General Yahya Rasool said the Russian was "the first (jihadist) to surrender" to Iraqi forces in west Mosul, scene of the most ferocious battles.

The Russian was handed over to Iraqi intelligence and then to judicial authorities, said Rasool.

During his interrogation, the Russian said he had studied engineering and discovered Islam in Moscow, where Uzbek construction workers introduced him to the religion.

After obtaining his degree in 2014, the Russia said he travelled to Turkey with the intention of entering Syria to join IS.

According to his testimony, he pledged allegiance to the jihadist group in Mosul, trained for a month and took the name Abu Yasmina al-Russi.

The Russian said he was wounded during compact in Iraq -- in Baiji and in Fallujah -- before his capture in Mosul.

Iraqi authorities have never provided a tally for the number of jihadists who have been arrested in the offensive to drive IS out of the country.

But Iraqi and Kurdish peshmerga commanders have said that hundreds of jihadists have surrendered since the group swept across Iraq in 2014 seizing swathes of territory.