Shiite militiamen on Monday in Baghdad, where Iraqi extremists ambushed and killed more than 20 fighters the day before. CreditAyman Oghanna for The New York Times
WASHINGTON — A senior American diplomat met with his Iranian counterpart in Vienna on Monday to explore whether the United States and Iran could work together to create a more stable Iraqi government and ease the threat from Sunni militants.
The initial meeting took place after Secretary of State John Kerry signaled that the Obama administration was open to cooperating with Iran on Iraq, raising the possibility of seeking help from a country that the United States has often described as a state sponsor of terrorism that must be prevented from obtaining a nuclear weapon.
The Obama administration’s strategy is to pressure Iraq’s prime minister, Nuri Kamal al-Maliki, and his Shiite-dominated government to form a multisectarian government with Sunnis and Kurds in an effort to heal the rifts being exploited by the insurgents. But that goal could be frustrated if Iran decided to back hard-line Shiite leaders or sent Quds Force fighters into Iraq, aggravating the already inflamed tensions.
On Monday night, the White House said President Obama had convened a meeting of his top national security advisers to review options in combating the Sunni militant group known as the Islamic State in Iraq and Syria, or ISIS, which routed the Iraqi Army last week. Mr. Obama has made clear that no American military help will be forthcoming unless Iraqis make an effort to bridge their divisions.
Earlier, Mr. Kerry said in an interview with Yahoo! News that the United States was “open to discussions if there’s something constructive that can be contributed by Iran.”
“I think we need to go step by step and see what, in fact, might be a reality, but I wouldn’t rule out anything that would be constructive,” he said.
In Vienna, the senior American diplomat, Deputy Secretary of State William J. Burns, briefly raised Iraq on the margins of previously scheduled negotiations on Iran’s nuclear program. American officials did not say when the next meeting would take place.
A State Department official said the purpose of the “engagements” with Iran and other neighbors of Iraq would be to discuss the threat posed by Sunni militants and “the need to support inclusivity in Iraq and refrain from pressing a sectarian agenda.”
Although Mr. Kerry, in his Yahoo! News interview, left the door open for military cooperation with Iran, the State Department official noted later that the meetings would not discuss “military coordination or strategic determinations about Iraq’s future over the head of the Iraqi people.”
In a sign of the growing dangers in Iraq, Mr. Obama notified Congress on Monday that he is sending as many as 275 military personnel to augment security and provide support for the heavily fortified American Embassy in Baghdad. The United States has already announced plans to evacuate a significant number of embassy personnel.
Some Iranian officials have suggested that Mr. Maliki work with Sunnis to quell the insurgency. But Gen. Qassim Suleimani, the head of Iran’s paramilitary Quds Force of the Revolutionary Guards, recently traveled to Baghdad to meet with Iraqi leaders, and there are concerns that he is mobilizing Iranian-trained Iraqi Shiites to defend the Maliki government.
American officials, while prepared to work with Mr. Maliki, are also prepared to see him replaced by another Shiite politician who might be more inclusive. But it is widely accepted in Iraqi politics that any plausible candidate for the post of prime minister must also be acceptable to Iran.
Complicating the picture are the parallel talks between Iran and world powers on its nuclear program.
With an initial July 20 deadline for an agreement looming, Iran has been pressing for a deal that involves a brief period of limits on its ability to enrich uranium, followed by a significant expansion in the number of centrifuges it can build to enrich uranium. The United States and its European allies say that the limits must be permanent and that any arrangement must provide considerable warning if Iran tries to race for a bomb.
One expert who has periodically advised the American negotiating team said there was already “a recognition the Iranians will try to milk any help on Iraq to get any advantage they can” as they haggle with the lead negotiators over how much of their nuclear infrastructure can remain if a final nuclear agreement is reached.
Mr. Obama’s aides, however, have long said that preventing Iran from gaining a nuclear weapon is his No. 1 priority in the Middle East, in part because an Iranian nuclear weapon, the president has argued, would set off an arms race in the region. For that reason, American officials insist that the nuclear question and the Iraq issue must be kept separate.
And a common enemy — ISIS — does not guarantee a common strategy. For two countries that have been deeply distrustful adversaries for more than three decades, finding common security interests will not be easy, officials said. That was clear in the cautious tone of some of those officials.
The outreach to Tehran was a surprising turnabout for the Obama administration, which has not held talks over regional crises with Iran. Cooperation between the United States and Iran to contain the Iraqi crisis would represent the first time the two countries have jointly undertaken a common security purpose since they shared military intelligence to counter the Taliban in Afghanistan after the attacks on Sept. 11, 2001.
Mr. Kerry, in fact, worked furiously in January to persuade the United Nations to disinvite Iran from the Geneva peace talks on Syria, arguing that Tehran’s military support to Syria’s president, Bashar al-Assad, disqualified it from participating.
The United States and Iran have long been bitter, and even deadly, rivals in Iraq. Iran’s Quds Force trained Iraqi Shiite militias that targeted American troops, and it supplied those militants with powerful explosive devices. The American military established a task force to hunt Iranian-backed Shiite Iraqi fighters.
The Bush administration held talks with Iranian officials in Baghdad during the American occupation of Iraq. But those discussions made no headway.
Moreover, the Treasury Department accused Iran this year of harboring an militant who provided support to Al Qaeda.