US and Iranian officials held talks over the advance of Islamist insurgents in Iraq on Monday, the first time the two nations have collaborated over a common security interest in more than a decade.



The discussions in Vienna took place on the sidelines of separate negotiations about Iran’s nuclear programme, as Barack Obama told Congress that the he was deploying up to 275 military personnel to Iraq.

The developments came amid conflicting signals in Washington over the extent of any coordination with Tehran over the crisis in Iraq.

John Kerry, the US secretary of state, pointedly declined to rule out military cooperation in an interview on Monday, but US and Iranian officials later stressed that there was no prospect of military coordination, and none was discussed in Vienna, where talks were described as short and inconclusive.



“We are open to engaging the Iranians,” said a senior State Department official, who characterised the discussions as brief. “These engagements will not include military coordination or strategic determinations about Iraq’s future over the heads of the Iraqi people,” the US official said, on condition of anonymity.



The Iranians confirmed that military cooperation was not on the cards. "The disastrous situation in Iraq was discussed today. No specific outcome was achieved," a senior Iranian official told Reuters.



Fighters from the Islamic State in Iraq and the Levant (Isis) have rapidly advanced through mostly Sunni areas of Iraq in recent days, capturing several cities. It was reported on Monday that they had taken Tal Afar, a northern Iraqi city. On Sunday, the insurgent fighters posted images purporting to show the execution of hundreds of Shia fighters.



Obama said in his notification to Congress that the military personnel being sent to Iraq would provide support and security for the American embassy in Baghdad, but was "equipped for combat".

"This force will remain in Iraq until the security situation becomes such that it is no longer needed," he said.

Around 170 of those forces have already arrived and another 100 soldiers will be on standby in a nearby country such as Kuwait until they are needed. In addition, officials told Reuters that the White House was considering sending a contingent of special forces to train and advise beleaguered Iraqi troops, many of whom have fled their posts in the face of the insurgency.



Earlier, in an indication of how sensitive in Washington any cooperation with Tehran would be, officials moved quickly to clarify remarks by Kerry, who went further than his administration colleagues in entertaining military cooperation with Iran against a common adversary.



"We're open to discussions if there is something constructive that can be contributed by Iran, if Iran is prepared to do something that is going to respect the integrity and sovereignty of Iraq and ability of the government to reform," Kerry told Yahoo News.



Pressed by interviewer Katie Couric over whether that would include military cooperation, Kerry replied: "At this moment I think we need to go step by step and see what in fact might be a reality. But I wouldn't rule out anything that would be constructive to providing real stability."



Less than three hours later, the Pentagon released a series of public statements that firmly ruled out military coordination. "There has been no contact, nor are there plans for contact, between [the Department of Defense] and the Iranian military on the security situation in Iraq," lieutenant commander Bill Speaks, a Pentagon spokesman, told the Guardian.



Notwithstanding the denials of military collaboration, the advent of joint diplomatic efforts between Washington and Tehran over the chaos in Iraq represents a dramatic turnaround for the two rival powers, whose relations, frozen for several decades, have only begun to thaw over the past year.



Military experts say any US air strikes in Iraq would will be impeded by the lack of intelligence from the the ground. An Iranian offensive, by contrast, would be expected to involve elite forces of ground troops that would engage in direct combat with Isis fighters, gaining a detailed knowledge of the battle lines.



Yet the notion of a partnership between the longtime foes prompted intense resistance in some quarters of Washington and Tehran on Monday. "It would be the height of folly to believe that the Iranian regime can be our partner in managing the deteriorating security situation in Iraq," senator John McCain said in a statement.



McCain's remarks contrasted with those of another Republican hawk, Lindsey Graham, who on Sunday expressed support for cooperating with Iran. McCain and Graham are usually in lockstep over foreign policy issues and their dispute revealed the divisions uncovered by the prospect of a collaboration with Iran.



Washington has dispatched some of its most senior White House and State Department officials to the nuclear talks in Austria, including the top deputy secretary of state, William Burns. He was scheduled to meet Iran's foreign minister Mohammad Javad Zarif and EU foreign policy chief Catherine Ashton on Monday.



Their meeting kicks off five days of negotiations between Iran and the six world powers collectively referred to as "P5+1". Before arriving in Vienna, Zarif spoke by telephone with the British foreign secretary, William Hague, about the possible role Iran could play in easing the conflict in Iraq.

Iran and the US previously collaborated over military intelligence in the post 9/11 fight against the Taliban in Afghanistan 13 years ago. But a US offical cautioned against reading too much into the latest talks. "No one should expect that all of a sudden, overnight, even if we resolve the nuclear agreement, that everything will change. It will not," the official said. "The fundamentals remain exactly as they are. Until we resolve the nuclear issue there cannot be any kind of fundamental change in this relationship."



In Iraq on Monday, the capital, Baghdad, remained outside the grasp of Isis. But the mayor of Tal Afar, a city of 200,000 people located 260 miles north-west of Baghdad, told the Associated Press that the insurgent group was in control there. A resident said militants in pickup trucks with machine guns and jihadi banners were roaming the streets as gunfire rang out.



Fighting in Tal Afar began on Sunday, with Iraqi government officials saying Isis fighters were firing rockets seized from military arms depots in the Mosul area. They said the local garrison suffered heavy casualties and the main hospital was unable to cope with the wounded.



There were fears that militants would carry out further atrocities in Tal Afar, which is ethnically mixed and made up of Shias and Sunni Turkomen.



Claims at the weekend that the insurgents had killed 1,700 Iraqi soldiers could not be verified. But pictures, on a militant website, appear to show masked Isis fighters loading captives on to flatbed trucks before forcing them to lie facedown in a shallow ditch with their arms tied behind their backs. The final images show the bodies of the captives soaked in blood after being shot at several locations.



Iraq's chief military spokesman, Lt Gen Qassim al-Moussawi, said the photos were genuine and that he was aware of cases of mass murder of captured Iraqi soldiers in areas held by Isis.



Tal Afar's capture came hours after Nouri al-Maliki, the Iraqi prime minister, vowed to retake every inch of territory seized by the militants.



"We will march and liberate every inch they defaced, from the country's northernmost point to the southernmost point," Maliki told volunteers joining up to fight the insurgents.



Additional reporting by Mark Tran