The United States and Iran briefly discussed the crisis in Iraq on the sidelines of a critical fifth round of nuclear talks in Vienna, US officials said.
The two nations, which have been bitter foes for more than 30 years, are both deeply concerned by a major insurgency by Sunni militants who have overrun swathes of Iraq over the past week.
"The issue did come up briefly with Iran on the margins of the P5+1 in Vienna today, separate from our trilateral meeting" which had included the EU, a senior State Department official said in a statement, released Monday, asking not to be named.
State Department deputy spokeswoman Marie Harf confirmed to CNN television that there were "brief discussions."
It is yet to be determined "if we want to keep talking to Iran about Iraq," she added, acknowledging though that Tehran and Washington had "a shared interest" in ensuring militants don't get "a foothold any more in Iraq."
But she stressed: "No outside country can fix Iraq's problems. We need Iraq's political leaders from across the spectrum to step up."
Another US official told AFP no further bilateral talks on Iraq were likely to be held in Vienna, but did not rule out further discussions elsewhere between the traditional foes.
Washington has however ruled out consulting with Tehran on any potential military action.
Pentagon spokesman Rear Admiral John Kirby said "there is absolutely no intention, no plan to coordinate military activities between the United States and Iran."
In the Austria capital were US Deputy Secretary of State William Burns, who held secret nuclear talks with Iran in 2013, and Iranian Foreign Minister Mohammad Javad Zarif.
Zarif was a key interlocutor between Shiite Iran and the US government after the September 11, 2001, attacks, when both sides were keen to oust the hardline Sunni Muslim Taliban in Afghanistan.
"The US and Iran discussed Afghanistan ... so from time to time there have been times where it makes sense to be part of a conversation," the US official said.
- Nuclear focus -
Signup to our newsletter and follow us on Facebook and Twitter!
The main focus in Vienna remains however efforts towards a nuclear deal with only five weeks before a July 20 deadline to sign on the dotted line.
The five permanent members of the UN Security Council plus Germany want Tehran to scale back its nuclear activities, while Iran wants all UN and Western sanctions to be lifted.
This long hoped-for accord would aim to once and for all silence fears that Tehran might develop nuclear weapons, and avert a slide into international conflict.
Both sides caution that there is a long way to go as negotiators confront the same sticking points that have dogged diplomatic efforts for the past decade.
The senior US official said however that contrary to the general assessment by experts, both sides actually began to draft a deal at their last meeting in May and "it was expected more will take place during this round."
She added that in US-Iranian bilateral talks last week, both sides "not only understood each other better ... but I think we both can see places where we might be able to close the gaps."
- Thorny issues -
The many thorny issues to be resolved in what would be a fiendishly complex deal include the duration of the mooted accord and the pace of sanctions relief.
But the gorilla in the room remains uranium enrichment, a process that can produce nuclear fuel but also, when highly purified, the core of an atomic bomb.
Iran wants to massively increase the number of centrifuges -- the machines that enrich -- saying it needs them to produce the fuel for a future set of civilian nuclear plants.
The West says these plants are years, if not decades, away from being built, and fears Iran's real aim is to use its centrifuges to enrich uranium to weapons-grade -- which Tehran denies.
French Foreign Minister Laurent Fabius said last week the West wants Iran to slash the number of centrifuges to "several hundred" from the current 20,000, of which 10,000 are operating.
"We are not even in the same ballpark," Fabius said.
Under an interim deal struck in November, Iran agreed to freeze certain nuclear activities for six months in return for minor sanctions relief.
This comes to an end on July 20 but it can be renewed -- if both sides agree.