KIRKUK, Iraq, Oct. 21 (UPI) — Islamic State militants on Friday attacked Iraqi government buildings in the northern city of Kirkuk as well as a nearby power plant, killing dozens of people about 100 miles away from Mosul, Iraqi officials said.

Three police stations and an Iraqi political party headquarters were attacked within Kirkuk in the Kirkuk Governorate, whose governor later said the attack carried out by IS sleeper cells had been “foiled.” At least six police officers and 16 civilians died in Kirkuk, while at least 13 died in the power plant attack in the nearby Dibbis village.

“All of the militants who attacked the police emergency building and the old building of the Kirkuk police directorate have been killed, but a number of other militants are still in Dumez district,” Iraqi Brig. Gen. Sarhad Qadir told BBC News.

At least 12 IS militants, including suicide bombers, died in the attack. Kirkuk Gov. Najmaldin Karim told Rudaw that some of the IS militants who carried out the attack could have disguised themselves as refugees who recently fled a nearby city.

“It was expected that ISIS sleeper cells would make a move one day in Kirkuk now that the Mosul offensive has started and they want to boost their own morale this way,” Karim said.

The Islamic State attack comes as Iraqi security forces, the Kurdish Peshmerga and a U.S.-led international coalition are engaged in an offensive to take Mosul — Iraq’s second-largest city — away from IS control.

Peshmerga forces on Thursday shot down a drone operated by the Islamic State in Nawaran, northeast of Mosul. The Peshmerga earlier this week said they had seen drones fitted with explosives operated by the Islamic State.