The Islamic State group Sunday claimed an Iraq attack that killed 10 people the previous night and which fuelled criticism the state is doing too little to fight the jihadists.
Salahaddin province north of Baghdad, the site of the bloodshed, declared three days of mourning.
The attackers first hit a civilian car with a roadside bomb late Saturday near Mt. Makhoul, 200 kilometres (120 miles) north of the capital, police said.
When security forces arrived, the gunmen opened fire, killing at least six security personnel and four civilians, including one who died of his wounds overnight, said local medics.
The latest violence heightened fears the government is doing too little to fight Islamist militants whose cells keep carrying out hit-and-run attacks.
Baghdad in 2017 declared IS defeated after three years of brutal fighting, wrenching back the one-third of Iraqi territory that had been captured by the ultra-conservative armed group that also controlled swathes of Syria.
But although the jihadists no longer hold their self-declared "caliphate", IS sleeper cells still wage attacks on state infrastructure, particularly in desert areas north of Baghdad.
Two weeks ago, an IS attack killed 11 people at Al-Radwaniyah on Baghdad's mainly Sunni Muslim outskirts.
The jihadist group has claimed more attacks in Iraq than in any other country between December 2018 and May this year, says the International Centre for Counter-Terrorism in The Hague.
IS activity in Iraq "accelerated precipitously" from February this year to levels "worryingly close" to those before its 2014 takeover, the centre said in a new study this month.
Although deaths have remained comparatively low, the study noted, the IS in Iraq appears to be moving into a phase "characterised by brazen guerrilla-style attacks".
Outrage at police
Iraq's security forces under Prime Minister Mustafa al-Kadhemi have been waging a new campaign to arrest jihadists hiding out in rugged terrain in the country's north and west.
The security forces have publicly claimed success. Just a day before the latest attack, federal police chief Jaafar al-Batat told state media that the Mt. Makhoul area had been cleared following some "isolated cases" linked to the IS — a comment that has outraged local figures.
"Iraqi security forces just assured us this area had been cleaned," wrote Mashaan al-Jaboury, a Sunni lawmaker representing Salahaddin, on Twitter after Saturday's violence.
Jamal al-Dhari, another Sunni figure, tweeted that the latest ambush "sheds light on the repeated failures in the fight against terrorism".
"The government of Mustafa al-Kadhemi must seriously put in place a national strategy … and stop being satisfied with 'investigative committees,'" said Dhari.
Iraqis regularly mock their government for establishing investigative bodies that do not produce results.
Pressure on US
The tensions come as the US-led coalition which helped Iraq fight IS from 2014, is drawing down its troops.
This year, the US has already shrunk its contribution to the coalition from 5,200 to some 3,000 troops, as other countries have reduced their numbers as well.
The US announced last week it would withdraw another 500 troops by mid-January, which Iraqi officials say is the fourth and final phase of the coalition's drawdown.
The top US commander for the Middle East, General Kenneth McKenzie, said the progress made by Iraqi security forces in recent years had allowed the US to send more troops home.
Tose forces remaining in Iraq would focus on training local forces, carrying out air strikes in support of their operations and running drone surveillance over the country.
The US military presence remains a source of controversy.
Iraq's parliament voted in January to oust all foreign troops, following a US drone strike on Baghdad that killed top Iranian general Qasem Soleimani and a leading Iraqi paramilitary commander.
Kadhemi, whose government is seen as US-leaning, has slow-walked the implementation.
Dozens of rocket attacks have meanwhile targeted Western diplomatic and military installations since October 2019.
The US has threatened to close its embassy in Baghdad unless the rocket attacks stop.
Pro-Iran factions have organised a series of rallies in recent months to demand Kadhemi send home the foreign troops.
One sign at a recent protest read: "If you don't leave on your own, our rockets will force you out!"