With Nouri Al-Maliki agreeing to step aside in favour of Haider Al-Abadi, Iraq may have passed its first hurdle on the way to forming the kind of government that will be needed to defeat the Islamic State (IS) and save the country from further conflict and fragmentation. Passing this hurdle may also serve to vindicate the cautious approach the Obama administration has taken in addressing the crisis created by the brutal eruption of IS. Iraq's recent problems didn't begin with the advances of IS. The successes of this horrific and violent extremist movement were in large measure the result of years of Al-Maliki's bad governance and sectarian repression. His policies created the fertile ground enabling the IS's precursor movement — the Islamic State in Iraq and Syria (ISIS) — to take root and find allies. In late 2011, when America was preparing to leave Iraq and Al-Maliki was completing the first year of his second term, Zogby Research Services polled Iraqi public opinion. The survey revealed warning signs on the horizon. Two-thirds of all Iraqis told us that they were afraid that with the departure of the US their country would sink into civil war, split into parts, and/or be dominated by a neighbouring country. A plurality of respondents in all groups (Sunni Arabs, Shia Arabs, and Kurds) was “worried” about the US departure. The survey also established a deep sectarian and ethnic divide, with Sunni Arabs and Kurds being the most worried about the US pullout and having the deepest concerns about the future of their country. The poll also revealed Al-Maliki to be a polarising figure. Attitudes towards him were nearly evenly divided among Shia Arabs, while three-quarters of Sunni Arabs and Kurds viewed him unfavourably. Most Iraqis indicated that they lacked confidence in Al-Maliki's ability to lead the country in the post-occupation period. Al-Maliki lived up to these negative expectations. With the US departure, he broke his commitment to absorb tens of thousands of decommissioned Sunni “Sons of Anbar” into Iraq's military and security services. He tormented prominent Sunni leaders with “charges” of “supporting terrorism”, forcing them into exile. And he operated in an increasingly authoritarian manner, maintaining personal control over key national security posts, locking out not only Sunnis but also former Shia allies. In the face of such oppressive sectarian behaviour, a disaffected Sunni insurgency in the restive Anbar region was inevitable. As the brutality of Al-Maliki's response matched that of his Syrian neighbour and ally, it was also inevitable that the Iraqi insurgency would become increasingly extreme and that it would develop closer ties with ISIS counterparts operating across the border in Syria. Al-Maliki's forces engaged in bloody conflict with ISIS and an array of Sunni Arab groups for months. It was not until ISIS and company overran Mosul in the face of a disintegrating Iraqi military that Al-Maliki felt the need to appeal to the US for assistance. This presented the Obama administration with both domestic and foreign policy challenges. Conservatives, who had long blamed the US president for leaving Iraq in the first place, were now hounding him to become militarily engaged and confront ISIS. Liberals, on the other hand, were war-averse and cautioned against any involvement, fearing “mission creep”. For its part, the Obama administration saw the need to balance several imperatives: the need to confront and help defeat what has become a transnational menace; the recognition that the US has a responsibility to Iraq and to the Americans and Iraqis who lost their lives during that long war; and the understanding that Iraqi reform and not American force is the key to any solution. Aware of both the regional and worldwide threat posed by IS, and the problems created by Al-Maliki's sectarian rule, the Obama administration took a cautious approach. Making it clear that it did not want to strengthen Al-Maliki's hand, the US conditioned support for the Iraqi military on the establishment of a more inclusive and representative government in Baghdad. At the same time, so as not to give IS a free ride, the US provided emergency airlifts to beleaguered refugees fleeing the movement's brutality. The US also used air power to strike at both IS's advance positions and to destroy some of the military equipment the extremists had seized when they overran Iraqi military positions in Mosul. Even this limited engagement paid dividends. It provided many of the previously trapped refugees with the cover they needed to escape. It gave Kurdish forces the opportunity to regroup and retake some areas that had fallen under the control of IS. And with the US back in the game, it became clear to Iraqis that only with Al-Maliki out of the way could the Iraqi military and political system secure the support needed to win a decisive victory over the extremist Sunni militants. Had the knee-jerk liberals had their way, the Obama administration would have done nothing for fear of becoming ground down in another Iraqi war the US could not win. Had the knee-jerk conservatives won the day, the US would have supported Al-Maliki with military force and more advanced weapons, thereby reinforcing his corrupt, autocratic and sectarian rule. Instead of these approaches, both of which would have had negative consequences, the Obama approach recognised that the problem of IS was created by bad governance and can only be remedied by Iraqis moving in a different direction. With Al-Maliki gone, one hurdle has been passed. In the next month, prime minister designate Al-Abadi must make critical decisions. He must form a government that includes all segments of Iraqi society— Shia and Sunni Arabs, Kurds, Christians, Turkmen, and other minorities. He must act quickly to re-engage Sunni leaders who were forced into exile by his predecessor. He must also create new opportunities for disaffected Sunni Arabs and Kurds so that they see the government in Baghdad as representing their interests. This struggle against IS in Iraq is only one front in what will be a long and protracted conflict against militant extremism in the Levant. Denying the group its support base in Iraq will weaken it, but this is only the first step. The Iraqi military will need to finish the job by defeating the group militarily. Then comes the more difficult task of tackling the group's base of operations in Syria, a situation made more difficult by the very different circumstances that exist in that country. The writer is president of the Arab-American Institute.