The local government of a Kurdish province in northern Iraq says seven inmates have died of asphyxia in a fire started as part of a prison riot instigated to cover a foiled breakout attempt.

It said in a statement Saturday that another 12 inmates were being treated for smoke inhalation.

The riot was led by a convict sentenced to death on terrorism-related charges, it added. The riot began when he assaulted one of the guards. He and other inmates then tried to control the facility, located in Duhok province.

Prisons in Iraq have been bursting at the seams following the detention of thousands of Islamic militants during nearly three years of war against the Islamic State group. Iraq declared victory over IS in December.