Tehran could cast aside bitter differences with Washington to "cooperate" on Iraq as the crisis-hit country battles a fierce militant offensive, former Iranian president Hashemi Rafsanjani said in an interview published Wednesday.
The comments to Japanese daily The Asahi came as Iran sends members of its Revolutionary Guard to Iraq, with the security situation deteriorating as the Iraqi authorities battle militants.
The rapid offensive has overrun swathes of northern and central Iraq displacing hundreds of thousands of people, alarming both Washington and Tehran -- which has close ties to the current Iraqi government.
"We share problems (concerning Iraq) with the United States. There is no obstacle for our cooperation. We will cooperate, if necessary...(to fight) the terror," Rafsanjani said in the interview.
He cited information sharing and "mutual support in terms of finance and technology" among possible shared initiatives.
"If the United States makes a decision on Iraq, and if they need our cooperation, we will negotiate" on such an agreement, he added.
Iran has previously sent military advisers to Syria to aid President Bashar al-Assad's regime against rebel forces.
"There are policy differences between Iran and the United States on Syria, but we share things on Iraq," Rafsanjani was quoted as saying.
The possible cooperation comes as Washington leads a push by world powers to put an end to Tehran's disputed nuclear programme, with talks ongoing in Vienna.
In exchange for an agreement, Iran wants punishing Western sanctions to be lifted.
Rafsanjani said in the interview that finding agreement would be tough if other nations, including France and Britain, deny Tehran's "right to develop a nuclear programme for peaceful use".
The former politician also said the Revolutionary Guard -- a major military force with close ties to the supreme leader Ayatollah Ali Khamenei -- was "advising and providing guidance" in Iraq.
"We've been advising and will be advising on security issues," said Rafsanjani, who is now an influential religious leader.
"Under the principles of the Iranian government, there will be no military intervention," he added, when asked if Iran would send troops across the border.
Predominantly Iran has vowed to support ally Baghdad against the insurgency led by the jihadist Islamic State group.
Iran has sent "small numbers" of operatives into Iraq to bolster the government in Baghdad, but there was no sign of a large deployment of army units, the Pentagon said late last month.
When US troops occupied Iraq between 2003 and 2011, Washington accused Tehran of using the force to support Shiite militias attacking American soldiers.