Sudan's government and rebels from the southern part of the country signed key agreements Wednesday, paving the way for a comprehensive accord to end Africa's longest-running civil war.

The adversaries signed three protocols on power-sharing and the administration of three disputed areas in central Sudan, wrapping up outstanding issues that had prevented them from reaching a deal.

The pact is expected to lead to a full cease-fire and implementation accord to end a 21-year conflict between the government and the Sudan People's Liberation Army in which more than 2 million people have died, mostly in a famine caused by the war.

The signing took place in Naivasha, 60 miles west of the Kenyan capital, Nairobi. The accords are not related to rebels fighting a separate insurgency in the Darfur region of western Sudan, where humanitarian groups have raised fears of ethnic cleansing.

U.N. officials have described the situation in Darfur as the worst humanitarian crisis in the world. Human Rights Watch, based in New York, cited local sources saying Arab militia fighters attacked five villages in Darfur on Tuesday, killing 46 civilians.

The latest effort to end the southern conflict began in Kenya in 2002, and the government and the rebels have already agreed on how to share the wealth in Africa's largest country and what to do with their armed forces during a six-year transition period.

But the talks stalled in recent months as the parties wrangled over how to share power in a transitional government, whether the capital, Khartoum, should be governed under Islamic law and how Southern Blue Nile, Nuba Mountains and Abyei -- areas in central Sudan -- should be administered during the transition period.

The protocols signed Wednesday covered all those outstanding issues.

"This is not the final stretch of the peace process," said Lazaro Sumbeiywo, the chief Kenyan mediator. "It is one of the giant steps."

Details of the agreements were not immediately available. But Sudanese Transport Minister Sammani Waseilah said the parties agreed that Khartoum will be governed under Islamic law, and that there will be provisions for non-Muslims, but no special protections. He declined to give details of the power-sharing arrangements for the three disputed areas.

The southern conflict began in 1983 after rebels from the mainly animist and Christian south took up arms against the predominantly Arab and Muslim north. Although often simplified as a religious war, the conflict is fueled by historical disputes and competition for resources, including major oil reserves.

A man cries as he waits for the signing of three protocols between the Sudanese government and the People's Liberation Army.