Iran's Supreme Leader has approved co-operation with the US as part of the fight against Islamic State in northern Iraq, sources have told BBC Persian.
Ayatollah Khamenei has authorised his top commander to co-ordinate military operations with the US, Iraqi and Kurdish forces, sources in Tehran say.
Shia Iran regards the extremist Sunni Islamic State (IS) group, which views Shias as heretics, as a serious threat.
Iran has traditionally opposed US involvement in Iraq, an Iranian ally.
However last month US air strikes helped Iranian-backed Shia militia and Kurdish forces break a two-month siege by Islamic State (IS) of the Shia town of Amerli.
IS has taken over swathes of northern and western Iraq and eastern Syria in recent months.
Now, Iran seems to have taken steps to work closer with the United States, says BBC Persian's Kasra Naji.
Sources say Ayatollah Khamenei has sanctioned Ghassem Soleimani, the commander of the Quds force - the extraterritorial arm of the Revolutionary Guards - to work with forces fighting IS, including the US.
Gen Soleimani has been active in the past few months in strengthening the defences of Baghdad with the help of Iraqi Shia militias.
His picture has appeared on the internet showing him in northern Iraq around the time of the breaking of the siege of Amerli - an indication that this co-operation may have already started.