Sometimes you just have to shake your head and wonder how the human race has avoided self-extinction and prospered on the planet. That is to say some groups of people, normally spurred on by governments, but not always, ignore obvious ways to resolve a dilemma peacefully, undertake irrational wars that devastate all sides and innocents to boot, and then ultimately find the previously ignored solution for peace. Ugh!

That is the case in Sudan. The country is split between the Muslim Arab Misseriya in the north, who run the Sudanese government, and the animist, Christian, and African Ngok Dinka in the South. The two sides have fought two bloody civil wars since Sudan’s independence in 1956. The last war was one of the worst in post-World War II history—lasting more than two decades, killing two million people, and generating four million refugees.

In 2005, a peace agreement was finally reached, which allowed the southern area semiautonomous governance and scheduled a referendum in 2011 on whether the south would secede from the country. But last year, violence flared again in the oil-rich and disputed Abyei region between the north and south. Because this threatened to reignite the civil war, the two sides agreed to send the dispute to the Permanent Court of Arbitration in the Hague.

The court reached the obvious solution. Divide the region between the two contending parties. Sometimes humans get so impassioned about their cause that they can’t see the obvious solution, or at least can’t bring themselves to accept it. This lesson does teach that an outside mediator or arbitrator can sometimes be helpful in reaching even an already abundantly clear resolution.

Although it is not a complete guarantee that violence won’t resume in Sudan, both sides seemed very happy with the court’s decision. That decision was to draw a border in the Abyei region that gives the north most of the oil, places many of the Misseriya Arabs in the north, and allows the south to have the heartland of the fertile area. This land-for-oil swap and a border designed to separate warring ethnic groups should provide lessons for the still potentially explosive situation in Iraq.

The current problems in Iraq began when the U.S. invasion popped off the only force holding the fractious country together—authoritarian rule. But ethno-sectarian strife had been a constant since the British created the artificial country after World War I to control the region’s oil. The three main groups—Sunni Kurds, Sunni Arabs, and Shi’i Arabs (and countless tribes)—are all suspicious of each other and are leery of the others controlling the central government. This is because Iraq’s history has been of the Sunni Arabs controlling the central government and oppressing the other groups.

The sectarian conflict between Shi’i and Sunni Arabs has attenuated for the time being; although in other ethno-sectarian conflicts around the world, such conflict has tended to subside and then recur with a vengeance, perhaps next time in Iraq when U.S. troops are no longer nearby to quell any fighting.

Right now, the most potentially explosive situation is in the oil-rich northern city of Kirkuk, which is on the border between the Kurdish semiautonomous region and the Sunni Arab area of Iraq. Kirkuk and some other territory populated by Kurds are outside the semiautonomous region.

As U.S. forces pull back and before Iraq explodes into a civil war that will make the prior ethno-sectarian conflict look like a day at the beach, the United States should take some lessons from the successful resolution in Sudan. A neutral mediator—the U.S. occupiers can no longer be regarded as an honest broker—should be brought in to negotiate among the Iraqi groups to create a loose confederation of autonomous regions. In fact, the reality is that Iraq is already partitioned into such areas—with ethno-sectarian forces providing security in each.

In northern Iraq, as in Sudan, a land-for-oil swap should be attempted—whereby the Kurds give up some oil to the Arab Sunnis, who have little, in exchange for an expansion of the Kurdish semiautonomous zone to include most of the Kurds now outside the zone.

The lesson from Sudan is to let a neutral party design carefully drawn borders—but they don’t have to be perfect as long as they don’t strand a large minority on the other side—to separate warring factions into autonomous regions, making tradeoffs between land and natural resources. Then any such proposed confederation of autonomous regions would have to be approved by referendum.

It is sad that humans sometimes cannot on their own reach the obvious solution to simply divide the spoils between the warring factions; they would instead choose decades of conflict rather than a safe and more prosperous peace—the Israeli-Palestinian conflict is another case in point. That is where neutral international mediation or arbitration can play a valuable role.