The coming twenty-two days could make or break Iraq’s medium-term future. With the help of a few moves from Washington, each of them well within current U.S. capabilities, a tolerable outcome to this phase of the crisis is in reach.

The Obama administration handled the emergence of Prime Minister-designate Heidar al Abadi well, secretly encouraging him since June to split current Prime Minister Nouri al Maliki’s Dawa party from within. Tehran considers Abadi is far too Western and independent for their liking, and his designation for the top post has been a clear win for both Iraq and the West.

For reasons by now all too familiar, Iraq is a fundamentally turbulent place. The Kurds want independence from the Arabs, but no one will let them have it. 

The Sunni-Shia split is riven with charges of apostasy, a sin theoretically punishable—for tiny literal-minded minorities on both sides—by death in Islam. 

Meanwhile Iraqi society was profoundly brutalized by Saddam Hussein for twenty-four years, and his wars have made the country vulnerable to the conflicting desires of numerous neighbors.

[pullquote]

Iraq is also, as the world has seen time and again since the formation of the Iraqi state in 1920, a profoundly resilient place. Betting against its survival has never paid off.

Abadi has until September 12 to form a new government that wins the approval, in an up-or-down vote, of the country’s parliament. The key thing to look out for is whether Abadi’s slate has the backing not only of the country’s 65% Shia majority—Abadi’s sect—but also of the Kurds and Sunnis who threaten to leave Baghdad’s orbit forever.

Two main struggles are going on in Iraq. One is the war against ISIS. The other is the negotiations among various parliamentary factions over who will get which portfolios.

While limited in its tactical meaning, the recent retaking of the Mosul dam by a combination of U.S. airpower and Iraqi and Kurdish troops fighting on the ground (actively coordinated by US Special Forces) is a good example of how the U.S. can inexpensively exert a very positive influence on these two related issues.

Almost immediately after ISIS began its surge with the capture of Mosul, Iraq’s second largest city, in June, Iran started sending extensive military help to the Shia government in Baghdad, fromfoot soldiers to fighter jets to Qassem Suleimani himself, commander of the Iranian Revolutionary Guard Corps’ Quds Force. 

The Iranian effort has been an embarrassing failure: visibly ineffective militarily, worse than that politically. Meanwhile, the U.S., in a short week, with the Mosul dam victory and the bombings that successfully relieved the ISIS siege of tens of thousands of Yezidis trapped in theSinjar mountains, has shown just how powerful the the country's role can be.

The Sinjar/Mosul dam cooperation model should be extended to the outskirts of Baghdad and other non-Kurdish areas. Ample U.S. ground assets are now in place with Iraqi troops for such a use of U.S. air power. Already, Baghdad’s Shia majority are asking why the U.S. involves itself so in the far north, but not where ISIS threatens them. Now is the time for the U.S. to boost Abadi’s credibility within his own coalition.

For Abadi to bring the Kurds on board, three main issues need to be addressed soon. First, Baghdad owes the Kurdistan Regional Government $7 billion from the their allocation for this year’s federal budget to date, and the Kurds desperately need the funds. 

Iraq’s hard currency reserves are held at the New York Federal Reserve Bank, where Maliki has run the account down from over $70 billion to $10 billion. With a monthly budget of $9 billion, and monthly oil revenues of about $7.5 billion, there simply is not enough money in the kitty for Abadi to pay the Kurds what Baghdad owes them immediately. 

The U.S. can help the two sides come up with a workable plan to pay down the debt over time and provide assurances to the KRG that the payments will be made. 

The Kurds are also focused on legalization of their independent oil exports, and on the status of Kirkuk and other disputed areas over which they have taken control since the ISIS surge. The U.S. can help forge agreements on both of these controversial issues.

The promise of referendums in the disputed areas is a classic example of Iraq’s gift for solution-without-conclusion: before there can be a referendum, there needs to be a census, and who is to say when that will happen or who will sign off on its rules? The U.S. has sufficient honest broker credibility, and harder influence too, with Abadi’s Shias and the Kurds to facilitate “band aid” solutions to these two issues that buy time for all asides.

Iraq’s elected Sunni leaders have their own list of promises they are seeking from the Shia majority that Abadi now fronts: release of the approximately 100,000 Sunni men held without charge in Maliki’s prisons; dismantling of Maliki’s draconian, easily abused anti-terror legislation; an end to de-Baathification; re-integration of Sunnis into the armed forces; respect for the federalism at the heart of Iraq’s constitution; top positions in the new government, preferably Defense Minister; and prosecution of Maliki. 

All of these except the last are within the gift of Abadi’s Shia coalition right now, and the U.S., whose military support Abadi requires, is again in a positionto make the difference.

Meanwhile Maliki and Iran lurk. Until Abadi presents his list of ministers to the parliament and secures a Yes vote, the would-be autocrat whose extreme sectarianism brought a naturally troubled place to an unprecedented depth of danger remains not only the acting Prime Minister, but also the Commander in Chief and Defense and Interior Ministers. 

He was never Iran’s favorite, but Tehran much prefers him to Abadi, who spent his exile in Britain, speaks perfect English and decidedly leans West. 

If Abadi’s clock runs out, Maliki holds on to his job and any replacement, if there is one,would likely come from Tehran’s short-list of approved candidates, unlike Abadi.

The best way for the U.S. to act on these interests persuasively and expeditiously is to send a representative of real stature to Baghdad as soon as possible. 

Washington is blessed with a remarkable generation of recently-retired senior diplomats—Ambassadors Ryan Crocker, Robert Ford, and James Jeffery, for example—but their criticisms of administration policy make it unlikely that President Obama would choose any of them.

Feared by Tehran, a uniting force at home, respected across Iraq, General David Petraeus is the man for the job.

Bartle Bull is an author and journalist who has written about Iraq for the Wall Street Journal, Financial Times, Washington Post, New York Times and many other publications. His next book is a history of Iraq. He manages a fund that invests in the country. Follow him on Twitter@bb_bull.