The Sudan government and the country's southern rebels on Friday signed a permanent ceasefire and endorsed a plan that would end a civil war that has raged for 21 years.

The deal was signed in the Kenyan capital, where negotiators met a Dec. 31 deadline to finalize the procedural issues that have so far stood in the way of a comprehensive peace accord the government and rebels hope to sign on Jan. 9.

A Sudan Peoples Liberation Movement supporter dances while holding SPLM flag in Naivasha, Kenya, Friday. (AP photo)
A Sudan Peoples Liberation Movement supporter dances while holding SPLM flag in Naivasha, Kenya, Friday. (AP photo)

As word of the ceasefire reached Sudan, people took to the streets of the capital city of Khartoum, singing and waving the flag of the Sudan People's Liberation Movement, the main southern rebel group.

For more than two decades, Sudan's Islamic-dominated government has battled rebels in the Christian and animist south fighting for more autonomy and a greater share of the country's wealth.

More than two million deaths are blamed on the war, most of them caused by war-related famine and disease.

The deals signed on Friday set out protocols on sharing power, natural wealth and armed forces during a six-year transition period. They also set out the administration of three disputed areas in central Sudan.

The southern peace agreement would have no direct impact on the conflict in the troubled Darfur region in the west. Nonetheless, officials hope it could serve as a template for a future settlement there.

The World Health Organization says that since March, tens of thousands have died of disease and hunger brought on by the conflict in Darfur. As many as two million are believed to have fled their homes in the region.

Sudan has been wracked by a series of civil wars since gaining independence from Britain in 1956.