A Balancing Act on Iraq

President Obama has, so far, struck the right note on Iraq, where Sunni extremist militants are seizing territory and threatening the existence of the state. He has been cautious — emphasizing the need for political reform in Iraq and reaching out to other countries that could have an impact on its fate.

His opening to Iran has been the most controversial and potentially the most important move. Iran has the most leverage with the Shiite-led government in Baghdad and its prime minister, Nuri Kamal al-Maliki. The United States has been negotiating with Iran for months over Iran’s nuclear program, but the agenda had not gone beyond that until Mr. Obama sent a senior State Department official to discuss Iraq with an Iranian official in Vienna this week. The two countries cooperated on Afghanistan in 2001 against the Taliban, and, in theory, they should be able to find common interest in stabilizing Iraq.

Mr. Obama has called on Mr. Maliki to form a broadly representative government of Shiites, Sunnis and Kurds as a condition of any military action by the United States. The American ambassador in Iraq and a senior State Department official have been pressing that issue in Baghdad. Even so, Mr. Maliki on Tuesday refused to reach out to Sunnis. Maybe Iran can make him hear the message.

The Islamic State in Iraq and Syria — the rebel group known as ISIS that is sweeping across Iraq — is also waging war in Syria, commingling those conflicts and fueling Sunni-Shiite tensions throughout the Middle East. Mr. Obama and his aides have been consulting regional leaders, whose interests would be severely threatened by an Iraq in total collapse, whether they acknowledge it or not. Turkey, for instance, should shut its border to militants and to materiel flowing into Syria and Iraq. And Saudi Arabia, Kuwait and other gulf states need to stop financing (directly or indirectly) ISIS, which began as an Al Qaeda affiliate, and other extremist groups.

President Obama has said Iraq needs support to “break the momentum of extremist groups” and that he is considering his options, including military action. If there is a case for military action, Mr. Obama still needs to make it.

Speculation in recent days has focused on airstrikes by drones or planes against militant targets; if they are ordered, officials say they are likely to be isolated and tactical, like American operations in Yemen, and Iraqi forces would have to follow up on the ground.

If Mr. Obama decides to take military action, he must make it clear that it would not be done to support Mr. Maliki’s government, but to disrupt the militants’ momentum while the Iraqi Army regroups.

In the meantime, the administration has to develop better intelligence on the militants’ movements. It plans to provide more weapons to the Iraqi Army, even though major units disintegrated as the militants swept through northern Iraq. American officials say there are still capable Iraqi units to build on, but that seems a risky bet.

Whatever action Mr. Obama takes, it must be grounded in a larger political strategy that considers the full spectrum of sectarian dangers that are roiling the region. On Monday night, militants reached Baquba, about 40 miles north of Baghdad, before being turned back. In a horrific show of sectarian reprisal, 44 Sunni prisoners held in a Baquba police station, controlled by the Shiite-led government, were killed by the police as the Sunni militants attacked the station.