Iran is ready to combine efforts with the US in its fight against Sunni militants of the Islamic State (IS) in Iraq, it has been reported.
Supreme Leader Ayatollah Khamenei has reportedly authorised the commander of a Special Forces unit that was sent to Iraq to fight IS earlier this year, to liaise with other forces on the ground.
Major General Qasem Soleimani has been ordered to coordinate military actions carried out by his Quds force unit -- an elite corps of Iran's Revolutionary Guard -- with US, Kurdish forces and Iraqi forces, sources in Tehran told the BBC Persian service.
If confirmed, the development will mark a drastic change in Tehran's attitude towards Washington, as only two months ago Khamenei said he "strongly opposed" any US intervention in Iraq.
The US has since launched a series of targeted air-strikes against IS -- previously known as Isis -- in northern Iraq.
Those have in some instances helped Iran-backed Shia militia groups, as well as Kurdish forces.
Tehran was a strong supporter of the previous Shia dominated Iraqi government and has also endorsed new Shia Prime Minister Haider al-Abadi's effort to form an inclusive administration.
IS's Sunni hard-liners consider Shia as heretics and therefore Iran as an enemy.
Soleimani was dispatched to Iraq in June to head up a 150-man unit to help Iraqi forces regroup and fight back against IS, after the jihadist group took over large swathes of the country in a swift advance.
His cooperation with US officials might prove awkward, as the Major General famously orchestrated a Shia insurgency against US-led forces in Iraq in the wake of the 2003 invasion.
Meanwhile the US said it was working with other Nato member states to form an alliance to counter IS.
President Barack Obama and British Prime Minister David Cameron have been holding meetings with some of their Nato counterparts at the alliance summit in Wales pressing to form a coalition to tackle the jihadists.
"We need to attack them in ways that prevent them from taking over territory, to bolster the Iraqi security forces and others in the region who are prepared to take them on, without committing troops of our own," US Secretary of State John Kerry said.
"Obviously I think that's a red line for everybody here: No boots on the ground."
France's president Francois Hollande told reporters at the summit that his country would join such a coalition only if it was backed by a mandate from the United Nations.
However, Secretary-General Anders Fogh Rasmussen said that at this stage Nato was not looking to launch any combat mission, including airstrikes, although it fully welcomed and supported the actions of individual nations.
Rasmussen added that the alliance would "seriously consider" any request from the Iraqi government to provide defence capacity training, which it was doing in the country up to 2011.
"There has been no request for Nato involvement in such military actions [US airstrikes]. So what we have focused on in our discussions is this issue of defence capability building provided we receive such a request from the Iraqi government," said Rasmussen.
Two other areas Nato would be willing to get involved is in helping to coordinate airstrikes and sharing information on returning foreign fighters.
"We have decided to enhance cooperation in exchanging information on returning foreign fighters. The issue is really a matter of concern from a security point of view," Rasmussen said.