Iranian Foreign Minister Mohammad Javed Zarif, left, speaks during a joint news conference with his Iraqi counterpart, Hoshyar Zebari, in Baghdad on Sunday. (Ahmad al-Rubaye/AFP/Getty Images)

Iran won Iraqi support for its efforts to oppose a U.S.-led military strike on Syria during a visit to Baghdad on Sunday by the new Iranian foreign minister, highlighting how close the two countries have grown since U.S. forces withdrew in 2011.

Speaking during his first visit abroad since he was appointed last month, Iranian Foreign Minister Mohammad Javed Zarif warned that U.S. intervention in Syria risks igniting a regionwide war.

“Those who are short-sighted and are beating the drums of war are starting a fire that will burn everyone,” Zarif said during a news conference.

Standing alongside him, Iraqi Foreign Minister Hoshyar Zebari said all of Syria’s neighbors, including Iraq, would be harmed by American involvement in Syria’s two-year-old conflict.

“What I can say conclusively is that Iraq will not be a base for any attack, nor will it facilitate any such attack on Syria,” Zebari told reporters after holding talks with Zarif.

Zebari, a Kurd, was a staunch supporter of the U.S. invasion of Iraq a decade ago and has warm relations with the United States, but Iraq has been pulled closer into Iran’s orbit since the U.S. troop withdrawal, and the Syrian revolt threatens to revive the sectarian conflicts left unresolved with the troops’ departure. That Zarif chose Baghdad for his first trip abroad underscores the importance of the relationship

Zarif also met with Iraq’s Shiite prime minister, Nouri al-Maliki, who did not support the U.S. invasion but emerged as its biggest beneficiary after the United States and the Kurds together backed his candidacy for prime minister in 2006.

The Iraqi government has repeatedly insisted that it remains neutral in the Syrian conflict, but U.S. officials say Iraq is assisting Syrian President Bashar al-Assad’s regime by permitting overflights of Iranian weapons.

Asaib Ahl al-Haq, an Iranian-backed Shiite group loosely allied with Maliki, also has been sending a growing number of Iraqi Shiite volunteers to fight alongside Assad loyalists in Syria. They form part of a burgeoning, regionwide Shiite alliance that has emerged to support Assad, including Lebanon’s Hezbollah movement, as the Syrian conflict deepens the Middle East’s Sunni-Shiite divide.

Zebari acknowledged the split, saying of the threatened U.S. military intervention that “there are some countries who want it, some who don’t.”

However, he added, Iraq has “communicated to everyone that an attack on Syria would have a direct effect on its neighbors, including Iraq.”