Britain and the US are to enter direct talks with Iran over how to stabilise the situation in Iraq as the country heads towards a de facto partition between Sunnis, Shia and Kurds.
William Hague, the foreign secretary, spoke by phone to his Iranian counterpart Mohammad Javad Zarif at the weekend, he told MPs on Monday, on subjects that included Iraq. He is expected to make another statement on Iran on Tuesday, amid speculation that he will announce the reopening of Britain's Embassy in Tehran, which was stormed and looted in 2011.
The US also officially confirmed that it was prepared to engage with Tehran over events in Iraq, with a senior state department official saying that talks were likely on the margins of negotiations over Iran's nuclear programme in Vienna this week.
Iraqi officials have confirmed that Iran has sent senior military advisers to Baghdad to help draw up plans to repel a militant advance on the capital.
The admission that Iranian help might be needed to keep Iraq from disintegrating came as the competing factions within the country drew up defences along sectarian lines. The US remains committed to a united Iraqi state but many in the country see a partition between Sunni and Shia areas as inevitable, with the Kurds already having the makings of a de facto state in the north.
As international pressure built on the Iraqi government, John Kerry, the US secretary of state, said that air strikes against militant forces by manned or unmanned aircraft were an "important" option that was still under active review by US commanders.
"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 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."
The super-carrier USS George H W Bush arrived in the Persian Gulf over the weekend, accompanied by a cruiser and a destroyer both armed with Tomahawk cruise missiles.
Unlike the US administration, Mr Hague ruled out any direct military intervention, saying Britain would not take part in any air strikes, but said that an "operational liaison and reconnaissance team" from the Ministry of Defence arrived in Baghdad on Saturday. They would "assess the situation on the ground and assist the [British] Embassy in contingency planning", he told MPs.
However US officials said that any offer of military intervention would be conditional on Nouri al-Maliki, the Iraqi prime minister, drawing up a plan to heal the country's Sunni-Shia divide and overhauling its poorly-performing national army, which was routed by Isis forces.
Administration officials cited by the New York Times said President Barack Obama believed there was a now a "brief window to pursue diplomacy" as the advance of Isis forces was checked by the stronger defences of Baghdad where Shia militia are expected to stand their ground, unlike the Sunni-dominated towns of Mosul and Tikrit that fell to the rebels last week.
Officials added that US surveillance drones were flying over Iraq and that military options were being drawn up, but cautioned that identifying clear potential targets was "difficult and time-consuming".
Any understanding between the US and Iran risks further alienating Washington's traditional Middle East allies, Israel and Saudia Arabia, which already have deep misgivings about Mr Obama's attempts to forge a deal over Iran's nuclear programme.
Saudi Arabia publicly rejected any foreign intervention in Iraq on Monday, and blamed Mr Maliki's fanning of the sectarian tension in Iraq in recent years for giving rise to the Isis insurgency, a view that was echoed by the Sunni-dominated emirate of Qatar.