Tikrit: Militants attacked and temporarily occupied a city council headquarters and assaulted a police station in Iraq on Monday, as violence across the country killed 42 people, officials said.

The attacks on the city council and the police station, both in Salah Al Deen province north of Baghdad, illustrate the impunity with which militants in Iraq can strike even targets that should be highly secure.

The attack on the city council headquarters in Tikrit began when militants detonated a car bomb near the building and then occupied it, with employees still inside.

Iraqi security forces surrounded the building, and then carried out an assault that Counter-Terrorism Service spokesman Sabah Nouri said freed 40 people who were held inside.

“We freed all the hostages... and our forces killed one suicide [bomber], but two others blew themselves up,” Nouri said.

A police major and a doctor meanwhile said that a city council member and two police were killed, though it was unclear whether they died during the initial attack or the later assault by security forces.

Following the initial attack by the militants, security forces had ordered all government employees in the city, including teachers, to go home for the day.

The assault came after suicide bombers struck a police station in the town of Baiji, also in Salah Al Deen province.

One bomber detonated a car bomb at the gate of the station, after which three entered, shot dead an officer and a policeman, and waited.

SWAT forces then attacked, killing one of the militants, while the other two blew themselves up, killing three police.

And gunmen killed three soldiers guarding an oil pipeline near Tikrit.

The deadliest single attack on Monday was in the northern city of Mosul, where militants gunned down 12 people on a bus.

The city has become one of the most dangerous parts of Iraq, with militants carrying out frequent attacks and reportedly extorting money from shopkeepers.

Also on Monday, five car bombs and a magnetic “sticky bomb” on a vehicle exploded in and around the Iraqi capital, killing at least 17 people and wounding at least 43 — the second series of blasts in the area in 24 hours.

One of the car bombs went off in a car park near the Baghdad provincial council headquarters, killing at least four people and wounding at least 11.

The attacks came after another series of bombings in and around Baghdad killed at least nine people on Monday night, while violence elsewhere in the country that day killed a further 11 people, among them a TV presenter and a family of five.

The presenter, Nawras Al Nuaimi, was the sixth journalist to be killed in Iraq since October, five of whom died in Mosul.

Iraq has come in for repeated criticism over shortcomings in media freedom, and ranks first in the Committee to Protect Journalists’ Impunity Index, which tracks unsolved murders of journalists.