That wasn’t quite right—every country in the region opposes a Kurdish state—but it didn’t really matter. In July, everything changed again. Fighters from ISIS, who until then had only occupied Arab lands, began pushing into Kurdish areas. The vaunted peshmerga, which many people thought would crush ISIS, was embarrassed. Suddenly, the Kurds needed help. President Obama agreed to send weapons to the Kurds, but made it clear that he was opposed to their breaking away from Iraq.

At the same time, the Kurds found that selling their own oil wasn’t as easy as they had thought it would be. Many oil companies didn’t want to buy it, for fear that the government in Baghdad would sue them. The Kurds were forced to sell their oil at bargain rates, which wasn’t enough to cover the revenue lost to Baghdad.

The Iraqi government had its own reasons for settling its differences with the Kurds. The main one, of course, was ISIS, which is occupying nearly a third of the country, including several towns on the outskirts of Baghdad. A deal became possible when the Iraqis—pushed by American officials—finally dumped Maliki, the brutish and sectarian Prime Minister. In his place came Haider al-Abadi, who appears to be much more conciliatory.

For now, then, peace between the Kurds and Baghdad prevails, and Iraq, the most artificial of states, holds together. What happens next?