Sudanese government and southern rebel negotiators were locked in last-minute talks Friday, hours before the expected signing of a permanent cease-fire deal and endorsement of a plan on how to implement an agreement to end a 21-year civil war in southern Sudan (search), officials said.

The adversaries were struggling to resolve contentious issues, including funding for a separate army that rebels plan to maintain in southern Sudan as a security guarantee during the six-year transition period, said Ad'Dirdeiry Hamed, Sudan's deputy ambassador to Kenya (search).

The rebels want the government to fund the force, but Sudanese officials refuse because the military unit will not be part of the new national army.

The warring sides plan to sign a permanent cease-fire deal Friday and endorse a plan on implementing a series of protocols they signed since the latest round of peace talks began in Kenya in 2002, Hamed said.

"They are still being negotiated. We are hoping that by this afternoon, we will have finished and then sign," Hamed told The Associated Press.

Sudanese President Omar el-Bashir (search) and South African President Thabo Mbeki will observe the signing of the last main protocols that will form part of the comprehensive peace deal, said Esther Tolle, permanent secretary in Kenya's ministry of foreign affairs.

South Africa heads the African Union Committee on Post-Conflict Reconstruction of the War-Affected Areas in Sudan.

The Sudanese government and the southern insurgents will sign the final peace deal on Jan. 9 in the Kenyan capital, Nairobi, said Yasir Arman, spokesman of the rebel Sudan People's Liberation Army.

"The new year will be a year of peace and democracy in Sudan," Arman told The AP. "It will be the end of the longest war in Africa."

The two sides are also negotiating details of international guarantees they need during the transition.

The north-south war has pitted Sudan's Islamic-dominated government against rebels seeking greater autonomy and a greater share of the country's wealth for the Christian and animist south. The conflict is blamed for more than 2 million deaths, primarily from war-induced famine and disease.

The warring sides have signed six protocols on how to share power and natural wealth, what to do with their armed forces during a six-year transition period and how to administer three disputed areas in central Sudan.

Under the agreements signed on May 26, a referendum should be organized six years after a final peace treaty is reached to determine the future of the south.

U.N. and U.S. officials are hoping that a solution to the civil war — which will include a new constitution and power-sharing government for Sudan — will spur an end to the separate conflict between government-backed forces and rebels in the western Darfur region.

Disease and hunger have killed 70,000 in the Darfur region since March, the World Health Organization says. Nearly 2 million are believed to have fled their homes since the start of the crisis.