From the ashes of war, a fledgling nation is about to be born: the 193rd country in the world, by United Nations count.
A referendum beginning Sunday is almost certain to approve independence for southern Sudan, symbolically ending its 50-year torment of war and hunger. But the voting is the easy part. In the 21st century, how do you negotiate the peaceful breakup of a giant African country, avoiding a myriad of potential flashpoints?
When the referendum is over, Sudanese negotiators will have six months to finesse the sticky questions of how to divide Africa's biggest country. There are dozens of complexities that will need to be resolved, from citizenship and currency to disputed borders and the divvying-up of the national debt and the lucrative oil wealth.
And it is all supposed to be done by July 9, when the current peace agreement expires. That's the day when southern Sudan is planning to declare its independence, even if the disputes are not settled by then.
The south will have no patience for long negotiations. Its people are already counting on secession. "Bye Bye Khartoum," says one of the posters in the southern capital, Juba, accompanied by a skull-and-crossbones image that alludes to the 2.5 million people who were killed in decades of civil war between the north and south.
But there is no guarantee that the north will co-operate in negotiating secession. Talks are badly stalled on several key issues, including the fate of the crucial oil-producing border region of Abyei. At least six sections of the border are still contested, and Abyei has cancelled its planned referendum on whether to join the north or the south.
Northern negotiators, who are supposed to spend a week in Juba every month to work on the disagreements, often return home after just a few hours of talks, according to sources close to the negotiations.
Here are the latest updates via Twitter from The Globe's Geoffrey York:
Geoffrey York on Twitter
Oil revenue, which is crucial to the northern and southern governments, is currently divided on a 50-50 basis. The south wants 80 per cent of the oil revenue, calculating that 80 per cent of the oil reserves are in the south, even though the pipeline goes northward to a northern port and refinery. The north has refused to indicate what percentage of the oil revenue it wants, making it difficult to negotiate a deal, southern officials say.
When the peace agreement was signed, the south accepted a 50-50 split of the oil revenue "because we were buying our freedom," says Michael Makuei Lueth, a senior cabinet minister in southern Sudan who participates in the negotiations with the north.
"It was a temporary arrangement," he said in an interview. "It is one of the burning issues now."
Issues such as oil and Abyei will be difficult to settle by the deadline, he acknowledged. "Of course we won't get everything resolved before July 9."
Wolfram Lacher, a researcher at the German Institute for International and Security Affairs, says there is "significant divergence" between the two sides on how to split the oil revenue. "Should either side use the instruments of pressure available in this area - such as a temporary export blockage by the north - this could potentially trigger war," he wrote in a recent analysis.
At the same time, Khartoum seems to have "gradually resigned itself" to the south's secession, he said. "For the central government, the costs of preventing secession by force would be prohibitive, such as in the form of deepening international isolation and the emergence of a second front, in addition to Darfur," he said.
Thabo Mbeki, the former South African president who is now a senior envoy in Sudan's north-south negotiations, is optimistic that the two sides will learn to co-exist peacefully after the referendum. The north and south have already agreed to work together to build "two viable states" if the south votes for secession, he said in a speech in Juba on Friday.
He called for a "soft border" between the two sides, and a "special relationship of good neighbourliness" across this border.
"The self-determination of the southern Sudanese people is a cause for celebration across Africa," he said. He described the referendum as the beginning of "the true emancipation of the people of southern Sudan."
The main spokesman for the southern government, Information Minister Barnaba Marial Benjamin, said the negotiations on disputed issues could continue after the south declares its independence in July. "We've agreed with Khartoum that the spirit of dialogue should continue," he said in an interview. "We'll be friendly neighbours. The chances of war are remote. People will be surprised - there will be no violence after this referendum."
Khartoum has an incentive to recognize the south's independence after the referendum, since this will pave the way for an agreement on oil-sharing and other key issues, he said.
There are reports, too, that Khartoum could receive a major package of concessions from the United States - perhaps even the lifting of U.S. sanctions against it - if it allows the south to secede peacefully. Those concessions could be a tempting prize for the north as it debates whether to accept the referendum results.