"Baghdad will never join the anti-Iran coalition,” he told the Spanish newspaper ABC, a translated version of which was published in various media outlets.
Ja'afari was apparently referring to the unofficial alliance between the United States and some Persian Gulf Arab states, most notably Saudi Arabia.
Iraq will not fall into line with the policy, which Washington has adopted against the Islamic Republic, the top Iraqi diplomat added.
The remarks came days after US President Donald Trump traveled to Saudi Arabia on his first foreign visit, signing a $110-billion arms deal with the kingdom.
The US named Iran as the target of the deal and urged cooperative measures between the signatories and other Arab countries against what it calls an unfavorable regional role by Iran.
Tehran rejects accusations of meddling in the region, saying instead that military interventionism there by Washington and its allies has brought about much regional bloodshed and destruction.
Ja’afari said Iran has not occupied even an inch of the Iraqi soil, while Turkey has advanced as far as 110 kilometers (68 miles) into the country’s territory.
Turkey has been maintaining a military presence in Iraq since December 2015 without the Arab country’s permission. Baghdad has repeatedly called on Ankara to withdraw its forces, describing Turkey’s military presence in Iraq as a violation of its sovereignty.
Relations between the two countries were strained last December, when Turkey deployed some 150 soldiers, equipped with heavy weapons and backed by about two dozen tanks, to the Bashiqa military camp on the outskirts of Mosul.