Iraq is standing by to mediate between the US and Iran but believes American unilateral action is not useful, Iraqi Foreign Minister Mohammed Al Hakim said on Sunday.
Standing with Iranian Foreign Minister Javad Zarif, who is in Iraq for a two-day visit, Mr Al Hakim said that Baghdad would “stand with our neighbour” but was willing to mediate.
Baghdad "will work to reach a satisfactory solution", he said.
Tension between the US and Iran have escalated since the Trump administration withdrew last year from the 2015 nuclear deal between Iran and world powers, and reinstated American sanctions that have badly damaged the Iranian economy.
Washington and Tehran are Baghdad's two main allies.
The mediation offer by Mr Al Hakim echoed one made on Saturday by Mohammad Al Halbousi, the Iraqi Parliamentary Speaker.
US President Donald Trump has said that the nuclear deal failed to curb Iran’s ability to develop nuclear weapons or halt its support for militias throughout the Middle East, which are destabilising the region.
Mr Zarif said that Iran would battle against any war effort against it, be it economic or military.
The Iranian official also urged for a non-aggression agreement between Iran and Arab states.
Mr Zarif said that European states had to do more to preserve the 2015 nuclear deal after the US.
This is a point he has made repeatedly, especially on May 8, when Iran used the anniversary of Mr Trump’s withdrawal to announce Iran's intention to drop some commitments in the deal.
The move was seen as a shot towards Europe, urging it to save the agreement or face its collapse. Until now, Iran has maintained compliance with the deal, the international atomic agency has reported.
Mr Zarif arrived in Baghdad on Saturday evening and joined Iraqi Prime Minister Adel Abdul Mahdi for iftar.
Mr Abdul Mahdi’s office said the two officials discussed “ways of making the two countries and the region avoid the harms of sanctions and the dangers of war”.
They also spoke about the importance of security and stability in the Middle East and how to maintain the nuclear deal.
Mr Abdul Mahdi said last week that Iraq would send delegations to the US and Iran to help end tension between the countries, and said Baghdad was neutral in the conflict.
Late on Saturday night, Iranian President Hassan Rouhani said he could hold a referendum over the 2015 deal.
Mr Rouhani said he previously suggested a referendum to supreme leader Ayatollah Ali Khamenei in 2004, when he was a senior nuclear negotiator.
Such a referendum could provide political cover for the Iranian government if it chose to increase its enrichment of uranium, prohibited under the 2015 deal with world powers.
In recent weeks, tension between America and Iran have risen after the US sent an aircraft carrier and B-52 bombers to the region.
It also announced that 1,500 troops would be sent to the region after a threat it said it identified from Tehran.