"Iran and the United States have common interests in Iraq. And there is no obstacle to cooperation. If the two countries deem it necessary that there is a need for cooperation, they may make planning in this regard," Ayatollah Akbar Hashemi Rafsanjani said in an exclusive interview with the Japanese newspaper Asahi Shimbun on July 7.

Rafsanjani also said a number of Iranian advisers are in Iraq to help government forces deal with militants of the Islamic State, adding that Iran has no military presence in the Arab country.

"Iran, Iraq, and the United States have become involved in fighting terrorism. Eliminating terrorists is a common issue of interest and beneficial to all," he said.

He added that it would be possible for Iran and the United States to cooperate through the "exchange of intelligence and experience as well as through mutual fiscal and technological assistance."

Rafsanjani expressed understanding for Washington's recent decision to send advisers of its own to assist the Iraqi military.

Iranian President Hassan Rouhani, during a June news conference, also left open the possibility of cooperation with the United States in dealing with the Iraq crisis.

Commenting on the talks between Iran and the major powers on Tehran's nuclear program, which are currently underway in Vienna, Rafsanjani said he met with Rouhani recently and told him, "The most important point will be for Iran to gain the trust of the international community that it will not develop nuclear weapons."

At the same time, Rafsanjani said Tehran must be allowed to develop nuclear power for peaceful purposes.

Elsewhere in his remarks, Rafsanjani said Iran was prepared to cooperate with Japan if it took a more independent stance.

"If Japan seeks a deeper relationship, it will have to seriously consider its relationship with the United States," he said. "While it should freely cooperate with the United States, it should not simply follow the orders of the United States."