Militants from the Islamic State of Iraq and the Levant (ISIL) have routed Baghdad's army and seized the north of the country in the past week, threatening to dismember Iraq and unleash all-out sectarian warfare with no regard for national borders.
Joint action between the United States and Iran to help prop up the government of their mutual ally would be unprecedented since Iran's 1979 revolution, demonstrating the urgency of the alarm raised by the lightning insurgent advance.
U.S. Secretary of State John Kerry called the advance an "existential threat" for Iraq. Asked if the United States could cooperate with Iran against the insurgents, Kerry told Yahoo News: "I wouldn't rule out anything that would be constructive."
As for air strikes: "They're not the whole answer, but they may well be one of the options that are important," he said. "When you have people murdering, assassinating in these mass massacres, you have to stop that. And you do what you need to do if you need to try to stop it from the air or otherwise."
Britain, once Washington's only major battlefield ally in Iraq, announced it had already reached out to Iran in recent days. A U.S. official said meetings with Iran could come this week on the sidelines of separate international nuclear talks.
Iran has longstanding ties to Iraq's Prime Minister Nuri al-Maliki and other Shi'ite politicians who came to power in Iraq after the U.S. invasion that toppled Saddam Hussein in 2003.
ISIL seeks a caliphate ruled on mediaeval Sunni Muslim precepts in Iraq and Syria, fighting against both Iraq's Maliki and Syria's Bashar al-Assad. It considers all Shi'ites to be heretics deserving death and has boasted of massacring hundreds of Iraqi troops who surrendered to its forces last week.
Its fighters are joined by other armed Sunni groups, who oppose what they say is oppression by Maliki's Shi'ite-led government in Baghdad.
ISIL fighters and allied Sunni tribesmen overran yet another town on Monday, Saqlawiya west of Baghdad, where they captured six Humvees and two tanks, adding to an arsenal of U.S.-provided armour they have seized from the disintegrating army.
Eyewitnesses said Iraqi army helicopters were hovering over the town to try to provide cover for retreating troops.
"It was a crazy battle and dozens were killed from both sides. It is impossible to reach the town and evacuate the bodies," said a medical source at a hospital in the nearby largely insurgent-held city of Fallujah.
Overnight the fighters also captured the mainly ethnic Turkmen city of Tal Afar in northwestern Iraq after heavy fighting on Sunday, solidifying their grip on the north.
"The city was overrun by militants. Severe fighting took place, and many people were killed. Shi'ite families have fled to the west and Sunni families have fled to the east," said a city official who asked not to be identified.
Tal Afar is a short drive west from Mosul, the north's main city, which ISIL seized last week at the start of its push. Fighters then swept through towns and cities on the Tigris before halting about an hour's drive north of Baghdad.
Iraq's army is holding out in Samarra, a Tigris city that is home to a Shi'ite shrine. A convoy travelling to reinforce the troops there was ambushed late on Sunday by Sunni fighters near the town of Ishaqi. Fighting continued through Monday morning.
OBAMA WEIGHING OPTIONS
U.S. President Barack Obama pulled out all American troops in 2011 and has ruled out sending them back, although he says he is weighing other military options, such as air strikes. A U.S. aircraft carrier has sailed into the Gulf. CNN reported that it was accompanied by a Navy warship carrying 550 Marines.
The only U.S. military contingent on the ground is the security staff at the U.S. embassy. Washington said on Sunday it was evacuating some diplomatic staff and sending about 100 extra marines and other personnel to help safeguard the facilities.
The sprawling fortified compound on the banks of the Tigris is the largest and most expensive diplomatic mission ever built, a vestige of the days when 170,000 U.S. troops fought to put down a sectarian civil war that followed the 2003 invasion.
Iraqis now face the prospect of a replay of that extreme violence, but this time without American forces to intervene.
Potential cooperation between the United States and Iran shows how dramatically the ISIL advance has redrawn the map of Middle East alliances in a matter of days.
Rouhani has presided over a gradual thaw with the West, including secret talks with Washington that led to a breakthrough preliminary deal last year to ease sanctions in return for curbs on Iran's nuclear programme. But open cooperation against a mutual threat would be unprecedented.
A spokesman for British Prime Minister David Cameron confirmed that London had already made overtures to Tehran.
A U.S. official said talks over Iraq between U.S. and Iranian officials could take place this week in Vienna, where both sides are attending nuclear negotiations.
Iran blames the United States and its Gulf Arab allies for stoking Sunni militancy in the region by backing the uprising against Tehran's ally Assad in Syria, where ISIL emerged as a dominant Sunni rebel group in a three-year civil war.
Asked if Iran would work with the United States against ISIL, Rouhani said on Saturday: "We can think about it, if we see America starts confronting the terrorist groups in Iraq or elsewhere."
Any rapprochement between Washington and Tehran over Iraq could anger U.S. allies Israel and the Sunni Gulf Arab states. Saudi Arabia, the Gulf's main Sunni power, said it rejected foreign interference in Iraq, and blamed Baghdad's "sectarian and exclusionary policies" for fuelling the insurgency.
ISIL fighters began their assault last week by capturing Mosul. They swept through other Sunni cities in the Tigris valley north of Baghdad, including Saddam's hometown Tikrit, where they captured and apparently massacred troops stationed at Speicher air base, once one of the main U.S. troop headquarters.
A series of pictures distributed on a purported ISIL Twitter account appeared to show gunmen from the Islamist group shooting dozens of men, unarmed and lying prone on the ground.
Captions said the pictures showed hundreds of army deserters captured as they tried to flee the fighting. They were shown being transported in the backs of trucks, led to an open field, laid down in rows and shot by several masked gunmen. In several pictures, the black ISIL flag can be seen.
"This is the fate of the Shi'ites which Nuri brought to fight the Sunnis," a caption to one of the pictures reads.
ISIL said it executed 1,700 soldiers out of 2,500 it had captured in Tikrit. Although those numbers appear exaggerated, the total could still be in the hundreds. A former local official in Tikrit told Reuters ISIL had captured 450-500 troops at Speicher and another 100 elsewhere in Tikrit. Some 200 troops are still believed to be holding out in Speicher.
Power and running water were off in Tikrit, leaving residents dependent on water being brought in by tanker trucks.
With ISIL's advance halted on the Tigris an hour's drive north of the capital, fighters also hold most of the Euphrates valley to the west, which they captured at the start of the year, bringing them to the gates of the city of 7 million.
Shi'ites, who form the majority in Iraq and are based mainly in the south, have rallied to defend the country, with thousands of volunteers turning out to join the security forces after a mobilisation call by the top Shi'ite cleric.
ISIL emerged after Saddam's fall, fought against the U.S. occupation as al Qaeda's Iraq branch and broke away from al Qaeda after joining the civil war in Syria. It says the movement founded by Osama bin Laden is no longer radical enough.