The Iraqi army is claiming to have slowed down the lightning advance of Sunni fighters by regaining some territory in counter-attacks, easing pressure on the Shia-led government in Baghdad.

The gains by the Iraqi military came on a day when Iran pledged its support to the Iraqi government for beating back the fighters from the Islamic State in Iraq and the Levant (ISIL) and associated armed groups, and Washington ordered one of its aircraft carriers to head to the Gulf in case President Barack Obama decided to intervene.

"We have regained the initiative and will not stop at liberating Mosul from ISIL terrorists, but all other parts," said Major-General Qassim al-Moussawi, a spokesman for the Iraqi military's commander-in-chief.

The rebels' capture of major cities in the north and advances towards Baghdad in the last week have forced about 500,000 people to flee their homes and raised fears that Iraq could be torn apart.

Reuters news agency, citing security sources, said Iraqi troops on Saturday attacked an ISIL formation in the town of al-Mutasim, 22km southeast of Samarra, driving rebel fighters out into the surrounding desert.

The army also reasserted control over the small town of Ishaqi, southeast of Samarra, to secure a road that links the city to Baghdad and the cities of Tikrit and Mosul further north.

However, Al Jazeera's Omar Al Saleh, reporting from Baghdad, said that even though the army made those claims, "we haven't seen any pictures showing the government forces taking control of these areas".

Elsewhere, troops backed by the Shia Asaib Ahl al-Haq armed group helped retake the town of Muqdadiya northeast of Baghdad, and ISIL was dislodged from Dhuluiya after three hours of fighting, a tribal leader said.

In Udhaim, 90km north of Baghdad, Asaib fighters and police fought rebels who earlier occupied the local municipal building, an official there told Reuters.

International support

Baghdad got a further boost in its battle against the rebels when Iran's President Hassan Rouhani pledged to help, if asked.

"Until today, no specific request for help has been demanded. But we are ready to help within international law,'' he said.

Obama said on Friday that he was reviewing military options, short of sending troops, to combat the rebellion.

On Saturday, the Pentagon ordered an aircraft carrier to move from the northern Arabian Sea to the Gulf, readying it in case Washington decides to pursue a military option.

Christopher Hill, a former US ambassador to Iraq, said the move gives the president more flexibility to respond to the fighting in Iraq when he decides what to do.

"If he chooses to employ air strikes, the Bush aircraft carrier is right there and allows him to do that," he told Al Jazeera.

"It is certainly also a show of force. I think it shows that the US is deeply concerned over this conflict and where it may lead."

Meanwhile on Saturday, in a visit to Samarra, Iraqi Prime Minister Nouri al-Maliki vowed to rout the fighters, whose onslaught has put the future of Iraq as a unitary state in question and raised the spectre of sectarian conflict.

The ISIL has expanded to control vast swathes of Iraq and Syria and aims to establish a new Islamic caliphate.

Thousands of people have responded to a call by Iraq's most influential Shia cleric to take up arms and defend the country against the ISIL.