Former U.S. ambassador to Iraq Ryan Crocker, shown here with Iraqi tribal leaders in 2007, says we should resume high-level diplomacy in the country. (John Moore/Getty Images)

Ryan Crocker was U.S. ambassador to Iraq from 2007 to 2009, serving under both President George W. Bush and President Obama. He is currently dean of the Bush School of Government and Public Service at Texas A&M University.

The news from Iraq is, quite frankly, terrifying. And it was utterly predictable.

I have been saying for months that we must do everything we can to support Syria’s neighbors — Jordan, Lebanon and especially Iraq — to ensure that the al-Qaeda contagion in Syria does not spread. It has. The Islamic State of Iraq and Syria (ISIS) now occupies much of the area between Kurdistan and Baghdad. Although the capital is unlikely to fall into its hands, ISIS has effectively established a radical Islamic state.

We would be foolish to think that ISIS will not plan attacks against the West now that it has the space and security to do so. This is a more formidable force than Osama bin Laden’s group that brought us 9/11. Its fighters are experienced, completely committed to their cause, well armed and well financed. As many as 2,000 of them hold Western passports, including U.S. ones, so there’s no need for visas. This is global jihad, and it will be coming our way.

We would be similarly foolish to deny the role that the United States played in Iraq’s unraveling. Like it or not, we are hard-wired into the Iraqi political system. The surge in U.S. military forces that began in 2007 succeeded in stabilizing the country in large part because it was accompanied by intensive, U.S.-led diplomatic activity that produced essential compromises among Iraq’s Shiite, Sunni and Kurdish communities. Yet as we’ve disengaged, the divisions we once bridged have widened and given militants the room they need to maneuver.

The development of a strong democracy built on institutions is a slow and painful process, as our own history so clearly demonstrates. The inability of our founding fathers to come to terms with fundamental issues such as slavery and states’ rights led to the bloody civil war that almost destroyed our country. The Iraqis came out of a far darker past. Decades of oppression by Saddam Hussein’s Baath Party imprinted the idea that compromise means concession, and concession means defeat and very possibly death. It should surprise no one that in the absence of sustained U.S. engagement, Iraqi leaders have not been able to resolve core political problems.

Without question, the sectarian practices of the Maliki government have been very damaging, leaving Iraqi Sunnis with a sense of disenfranchisement. Some course corrections are badly needed. But they will not come about just because we tell the prime minister that he needs to shape up and form a national unity government to deal with the militant threat. Yes, Nouri al-Maliki and his Sunni critics appeared together on television Tuesday calling for national unity. But just hours earlier, Iraq’s Shiite leaders announced a boycott of Sunni politicians and accused Saudi Arabia’s Sunnis of promoting “genocide.”

If a modicum of power-sharing can be achieved, it will require the kind of effort that we exerted when I was in Baghdad, from 2007 to 2009, and that we have not seen for too long. We learned then that what the Iraqis could not give to each other, they were sometimes willing to give to us, as long as they could trust that we would stand by agreements and that we would do so at the highest levels of our government. I had my role to play as ambassador, certainly. But the sustained engagement of the secretaries of state and defense and the president was critical to our bilateral Strategic Framework Agreement and Security Agreement in 2008, as well as to important compromises on the national budget, de-Baathification and electoral laws.

With that in mind, as a first step, Secretary of State John Kerry, who has been dispatched to the Middle East, should head to Iraq immediately and engage in intensive consultations with the leaders of all communities. The prospect of a permanently divided Iraq — with separate Shiite, Kurdish and Sunni enclaves — may impel them to meaningful compromise. But we are the indispensable catalyst.

It is not too late for diplomacy. Diplomacy worked at the height of the Iraqi civil war. It can work now. And it can work without boots on the ground. (Though the backing of the aircraft carrier George H.W. Bush in the northern Persian Gulf doesn’t hurt.)

There are other steps we should take, such as expanding our intelligence assets and deploying Special Operations advisers, as President Obama initiated this week, as well as developing target sets that could be hit by Iraqi or U.S. air power. These are all important, but they will not be sufficient to drive ISIS from the field. The main force has to be political, and it has to be led by the United States at the highest levels.

My years in the Middle East taught me to be careful what you get into — military interventions can have far-reaching, unpredictable consequences. You have to be even more careful with what you intend to get out of — disengagement can have consequences even graver than those of intervention. We failed to understand both lessons in Iraq.

The wisdom of the 2003 invasion will be debated endlessly. I certainly had doubts about it. But the point I made during my tenure there was that once you are in, you are in. You cannot undo an invasion. You can, by contrast, undo an unfortunate disengagement by reengaging forcefully before it’s too late.

History will be unforgiving if we allow this exceptionally virulent manifestation of al-Qaeda to take root across northern Iraq and begin planning its next phase of operations. This is a determined enemy, and it will not stop where it is now.

outlook@washpost.com

Read more from Outlook and follow our updates on Facebook and Twitter.