| Abyei, one of the "disputed regions" along the north-south border, has seen heavy fighting this year [EPA]
Southern Sudan's independence on July 9 will be the latest chapter - though almost certainly not the final one - in a decades-long struggle between the north and south.
The origins of the conflict are complex, and partly date back to the colonial era: Sudan's former British rulers gave Khartoum dominance over the unified country, laying the groundwork for the southern independence movement. The south's population is mostly Christian and animist, and identifies culturally with its East African neighbours, while the north is predominantly Muslim and Arab.
Feelings of alienation in the south led to the first Sudanese civil war, a conflict which dragged on for nearly two decades and killed at least half a million people. It ended in 1972 with the so-called Addis Ababa Agreement, which granted autonomy to southern Sudan.
The agreement began to fray in the late 1970s following the discovery of oil in border regions between the north and south. It collapsed completely in 1983 when then-president Gaafar Nimeiry declared Sudan an Islamic state, imposing shari'a law and alienating the southern population.
The Sudan People's Liberation Army (SPLA), which would become the main armed group in the south, was founded in the same year. It initially campaigned not for secession but for a "united Sudan," and accused the government in Khartoum of stoking divisions.
The civil war begins
Nimeiry was toppled by a military coup in April 1985; a civilian government retook power the following year, headed by Sadiq al-Mahdi from the Umma Party.
Several years of negotiations produced a tentative deal in 1988 between the SPLA and the Democratic Unionist Party, al-Mahdi's main opposition. The agreement would have suspended Islamic law, ended the state of emergency, imposed a cease-fire, and scheduled a constitutional convention.
But al-Mahdi refused to sign the deal, and so he was overthrown the following year in yet another military coup. Then-colonel Omar al-Bashir took power; he remains Sudan's president to this day.
An informal cease-fire between Khartoum and the rebels broke down in October 1989, and what followed was a bloody civil war which resulted in millions of deaths and a massive refugee crisis.
Roughly two million people have died during the conflict, according to human rights groups, most of them civilians; many died not from direct fighting but from other causes, like drought and starvation. Hundreds of thousands of civilians have sought refuge in neighbouring countries.
Both sides were accused of rampant human rights abuses. The SPLA allegedly carried out thousands of arbitrary detentions and summary executions in areas under its control; allegations of rape were also common. The government in Khartoum has been accused of bombing civilian populations, raiding villages to capture slaves, and arming Arab militias to carry out what the United Nations has called a policy of ethnic cleansing in the Darfur region.
Tens of thousands of child soldiers serve on both sides of the conflict.
The CPA era
Sudan's "peace process" began in the early 1990s, with a series of talks mediated by neighbouring countries, including Kenya and Ethiopia. For nearly a decade, though, these talks yielded little progress, partly because of the continued fighting, partly because of dissension in the south, where various groups splintered off from the SPLA and promoted their own agenda.
A new round of talks in 2002 yielded the first concrete agreement, the so-called Machakos Protocol, which provided a framework for further talks. Several more years of negotiations in Kenya produced a series of other agreements on issues including power-sharing, security, and the status of the Abyei region.
Those protocols were eventually combined into a single document - the Comprehensive Peace Agreement (CPA) - which was signed in Kenya in 2005.
The CPA created an autonomous regional government which would govern the south for six years. It also required southern representation in Khartoum, and established a power-sharing formula for the SPLM and the National Congress Party, the ruling party in the north. A national petroleum commission was created to oversee oil revenues.
After six years, according to the CPA, South Sudanese would vote in a referendum on whether or not to secede.
That referendum was held in January, and nearly 99 per cent of South Sudanese voted in favor of secession. Bashir promised to accept the results, and independence day was set for July 9, six months after the vote.
An uncertain future
But the CPA left a number of crucial issues unresolved, and the governments in Khartoum and Juba seem no closer to resolving them than they were in 2005.
One of them centres around Abyei, once one of Sudan's most oil-rich regions. In 2004 the region produced more than 76,000 barrels per day, roughly one-fourth of the country's total output. But production has declined over the last few years, down to roughly 28,000 barrels in 2009.
Still, the region's oil reserves - and its fertile agricultural lands - makes it an important goal for the governments in both Khartoum and Juba. So the CPA gave Abyei "special administrative status," and called for a referendum - separate from the southern referendum - to determine its future.
The vote was scheduled for January but was delayed, partly over a dispute on whether nomadic tribesmen who graze their cattle in the region would have the right to vote.
Two other regions, South Kordofan and Blue Nile states, have also been the site of fighting between the northern government and rebel groups seeking independence. Both are supposed to hold "popular consultations" later this year to decide their status, but the CPA left the nature of those talks open-ended.
Bashir said earlier this month that the northern army would continue an offensive in South Kordofan until the state was "cleansed" of pro-independence rebels.