BAGHDAD: Iraq said Sunday it had "regained the initiative" against militants who seized vast swathes of territory, as former UN mediator Lakhdar Brahimi blamed the crisis on global neglect of Syria's civil war.
Washington responded to the sweeping unrest by deploying an aircraft carrier group to the Gulf, but Iran has warned against foreign military intervention in its Shiite neighbour, voicing confidence that Baghdad can repel the onslaught.
The militants, spearheaded by the powerful Islamic State of Iraq and the Levant (ISIL) jihadist group, have overrun all of one province and chunks of three more since launching their offensive late Monday.
Security forces have generally performed poorly, with some abandoning vehicles and positions and discarding their uniforms, though they seem to be recovering from the initial onslaught and have started to regain ground.
Iraqi officers have said their forces were now starting to repel the militants, and that soldiers had recaptured two towns north of Baghdad.
Prime Minister Nuri al-Maliki's security spokesman, Lieutenant General Qassem Atta, said during a televised news conference on Sunday that Baghdad's forces have "regained the initiative" and killed 279 "terrorists" in the past 24 hours.
Iraqi officials often announce large militant tolls, with no way of independent verification, and downplay their own casualties.
Officials added that security forces and tribal fighters repelled a militant assault in the strategic town of Tal Afar near the Syrian border. It provides a critical corridor for militants to access conflict-hit Syria.
Ten people were killed in militant shelling of the town, and 18 anti-government fighters also died in ensuing clashes.
Baghdad's embattled forces will be joined by a flood of volunteers after a call to arms from top Shiite cleric Grand Ayatollah Ali al-Sistani, but a recruitment centre for volunteers came under attack on Sunday, killing six people.
US President Barack Obama said he was "looking at all the options" to halt the offensive that has brought militants within 80 kilometres (50 miles) of Baghdad's city limits, but ruled out any return of American troops to combat in Iraq.
Washington has, however, ordered an aircraft carrier group into the Gulf in response.
Obama has been under mounting fire from his Republican opponents over the swift collapse of Iraq's security forces, which Washington spent billions of dollars training and equipping before withdrawing its own troops in late 2011.
Iran warned Sunday that "any foreign military intervention in Iraq" would only complicate the crisis, voicing confidence that Baghdad "has the capacity and necessary preparations for the fight against terrorism".
Iranian President Hassan Rouhani said Saturday Iraq had not asked for its help.
But in surprise comments he added that Iran may "think about" cooperating with its arch-foe the United States to fight the militants in Iraq, despite the lack of diplomatic relations between Tehran and Washington for more than three decades.
Senator Lindsay Graham, a Republican critic of the American president, also called for direct engagement with Tehran, warning that the unrest in Iraq would give extremists a staging area for "the next 9/11".
Brahimi, the former UN and Arab League envoy to Syria, told AFP the international community's neglect of the conflict in Syria had precipitated the Iraq crisis.
"It is a well-known rule: a conflict of this kind (in Syria) cannot stay confined within the borders of one country," said Brahimi, who resigned as UN-Arab League representative to Syria in May.
As Iraqi troops began to drive back the militants, they found grisly scenes, amid reports of summary executions of Iraqi security forces members the militants captured.
Troops found the burned bodies of 12 policemen as they recaptured the town of Ishaqi in Salaheddin province, a police colonel and a doctor said.
Photos posted online were also said to show militants summarily executing dozens of captured members of the security forces in the province.
The situation on the ground has been further complicated as forces from the autonomous Kurdish region have made territorial advances.
A senior official said Sunday that Kurdish peshmerga forces had taken control of one of two official border crossings with Syria earlier in the week.
Kurdish forces have also seized the disputed ethnically mixed northern city of Kirkuk and surrounding areas, as well as other territory.
Amid the confusion, Iraq launched an air strike on a convoy of Kurdish forces Saturday night near Khanaqin, one area of eastern Iraq where Kurds have moved in, killing six people.
It was not immediately clear if the Kurdish troops were targeted specifically, or it was mistaken identity.
Although violence has eased in Baghdad, apparently as militants concentrate their efforts elsewhere, the capital has not been spared, with a Sunday afternoon bombing killing nine people.