(Adds Pentagon quote, paragraphs 17-18; Kerry call, paragraph 19)
* Baghdad regaining initiative against jihadist insurgents -army
* Iran says cooperation with US possible to ease Iraq crisis
* Iraqi PM visits front-line Samarra, vows to vanquish rebels
* Insurgents still press on some fronts, target oil refinery
By Ahmed Rasheed and Raheem Salman
BAGHDAD, June 14 (Reuters) - An offensive by insurgents that threatens to dismember Iraq seemed to slow on Saturday after days of lightning advances as government forces regained some territory in counter-attacks, easing pressure on the Shi'ite-led government in Baghdad.
As Iraqi officials spoke of wresting back the initiative against Sunni militants, neighbouring Shi'ite Iran held out the prospect of working with its longtime U.S. arch-enemy to help restore security in Iraq.
U.S. President Barack Obama said on Friday he was reviewing military options, short of sending troops, to combat the insurgency. The United States ordered an aircraft carrier moved into the Gulf on Saturday, readying it in case Washington decides to pursue a military option after insurgents overran areas in the north and advanced on Baghdad.
Thousands responded to a call by Iraq's most influential Shi'ite cleric to take up arms and defend the country against the insurgency, led by the Sunni militant Islamic State in Iraq and the Levant (ISIL).
In a visit to the city of Samarra, Prime Minister Nouri al-Maliki vowed to rout the insurgents, whose onslaught has put the future of Iraq as a unitary state in question and raised the spectre of sectarian conflict.
The militant gains have alarmed Maliki's Shi'ite supporters in both Iran and the United States, which helped bring him to power after invading the country and toppling former Sunni dictator Saddam Hussein in 2003.
Oil prices have jumped over fears of ISIL disrupting exports from OPEC member Iraq.
But having encountered little resistance in majority Sunni areas, the militants have now come up against the army, which clawed back some towns and territory around Samarra on Saturday with the help of Shi'ite militia.
"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, spokesman for the Iraqi military's commander-in-chief, pointing out areas the army had retaken on a map with a laser pen.
Militants in control of Tikrit, 45 km (27 miles) north of Samarra, planted landmines and roadside bombs at the city's entrances, apparently anticipating a counter-attack by government forces. Residents said the militants deployed across the city and moved anti-aircraft guns and heavy artillery into position. Families began to flee north in the direction of Kirkuk, an oil-rich city which Kurdish forces occupied on Thursday after the Iraqi army fled.
IRAQI ARMY COUNTER-ATTACKS
Security sources said Iraqi troops attacked an ISIL formation in the town of al-Mutasim, 22 km (14 miles) southeast of Samarra, driving militants out into the surrounding desert on Saturday.
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.
Troops backed by the Shi'ite Asaib Ahl al-Haq militia helped retake the town of Muqdadiya northeast of Baghdad, and ISIL was dislodged from Dhuluiya after three hours of fighting with tribesmen, local police and residents, a tribal leader said.
In Udhaim, 90 km (60 miles) north of Baghdad, Asaib and police fought militants who earlier occupied the local municipal building, an official there told Reuters, and they directed mortar fire at the government protection force of the Baiji oil refinery, Iraq's largest.
Masked jihadists under the black flag of ISIL aim to revive a medieval caliphate that would span a fragmenting Iraq and Syria, redrawing borders set by European colonial powers a century ago and menacing neighbours like Iran and Turkey.
Obama cautioned on Friday that any U.S. intervention must be accompanied by an Iraqi government effort to bridge divisions between Shi'ite and Sunni communities.
The aircraft carrier USS George H.W. Bush, ordered moved into the Gulf on Saturday, was accompanied by a guided-missile cruiser and a guided-missile destroyer, the Pentagon said in a statement.
"The order will provide the Commander-in-Chief additional flexibility, should military options be required to protect American lives, citizens and interests in Iraq," the Pentagon said.
U.S. Secretary of State John Kerry called Iraqi Foreign Minister Hoshyar Zebari on Saturday and expressed support for Iraq in its fight against insurgents, the Iraqi Foreign Ministry said in a statement. Kerry pledged $12 million and stressed that Iraq should assure its neighbours that the war is not sectarian, but against the insurgents, the statement said.
Iranian President Hassan Rouhani, asked at a televised news conference whether Tehran could work with the United States to tackle ISIL, said: "We can think about it if we see America starts confronting the terrorist groups in Iraq or elsewhere.
"We all should practically and verbally confront terrorist groups," added Rouhani, a relative moderate who has presided over a thaw in Iran's long antagonistic relations with the West.
A senior Iranian official told Reuters earlier this week that Tehran, which has strong leverage in Shi'ite-majority Iraq, may be ready to cooperate with Washington against ISIL rebels.
The official said the idea of cooperating with the Americans was being mooted within the Tehran leadership. For now, according to Iranian media, Iran will send advisers and weaponry, although probably not troops, to boost Baghdad.
U.S. officials said on Friday there had been no contact with Iran over the crisis in Iraq. Asked about Rouhani's comments on Saturday, a White House spokesman said he would have no further comment.
Any initiative would follow a clear pattern of Iranian overtures since the 2001 al Qaeda attacks on U.S. targets, which led to quiet U.S.-Iranian collaboration in the overthrow of the Taliban in Afghanistan and formation of a successor government.
The United States and Iran, adversaries since Iran's 1979 revolution toppled the U.S.-backed Shah, have long accused each other of meddling in the Gulf and beyond, and have not cooperated on regional security issues for more than a decade.
MALIKI HERALDS FIGHT-BACK
Militants attacked the convoy of the custodian of the holy shrine in Samarra, while he was en route to Baghdad. Sheikh Haider al-Yaqoobi was not harmed, but 10 of his guards were killed, a source in Samarra hospital said.
Maliki travelled on Friday to Samarra, one of the cities targeted - though not seized - by ISIL fighters who now prevail in a string of Sunni cities and towns running south from Mosul.
"Samarra will not be the last line of defence, but a gathering point and launchpad," he told military officers after Iraq's most influential Shi'ite cleric urged people to take up arms and defend the country against the insurgents.
"Within the coming hours, all the volunteers will arrive to support the security forces in their war against the gangs of ISIL. This is the beginning of the end of them," Maliki, a Shi'ite Muslim, said in comments broadcast on Iraqi television.
Maliki said the cabinet had granted him unlimited powers to confront insurgents. Last week, parliament failed to convene for a vote on declaring a state of emergency due to a boycott by most Sunni and Kurdish lawmakers.
In Basra, Iraq's main city in the mainly Shi'ite far south, hundreds volunteered to join the battle against ISIL, heeding a call to arms by Grand Ayatollah Ali al-Sistani, who commands unswerving loyalty from most Iraqi Shi'ites.
The volunteers, of all ages, were due to be given weapons and sent to a security centre in Basra later on Saturday ready to be transferred further north. "We the people of Basra obeyed our instructions to defend our country from south to north," said 63-year-old Kadhem Jassim.
Iran's Rouhani said he would review any request for help submitted by Maliki, although none had been received yet. "We are ready to help in the framework of international regulations and laws," he said. (Additional reporting by Isabel Coles in Arbil, Parisa Hafezi in Ankara and William Maclean in Dubai; Writing by Dominic Evans; Editing by Mark Heinrich, Stephen Powell and Gunna Dickson)
Our Standards: The Thomson Reuters Trust Principles.