KAMPALA - Ugandan rebels and the government have signed a ceasefire agreement in the latest step toward ending an insurgency that has lasted more than two decades.

The Ugandan conflict has been one of Africa's longest, sparked by a 1986 rebellion in the north when President Yoweri Museveni, a southerner, took power.

The two sides have largely adhered to a cessation of hostilities agreed upon in August 2006, a month after peace talks began, though there have been sporadic outbreaks of fighting. The formal ceasefire was signed Saturday.

"We are now moving towards the signing of the final peace agreement,'' said Chris Magezi, a spokesman for the government team. The ceasefire is set to take effect 24 hours after the signing of the final peace deal, which government negotiators expect by Feb. 29.

"There is only one major item remaining to discuss about and that is on disarmament,'' Magezi said.

Negotiators for the Lord's Resistance Army rebels also sounded optimistic.

"We are committed to seeing that peace returns to northern Uganda,'' said David Matsanga, one of the rebel negotiators.

The latest deal was the third in a week. On Tuesday the two sides signed an agreement on how to prosecute alleged war crimes and on Friday they agreed on actions the government will take to rehabilitate war-destroyed areas and ensure opportunities for government posts for people from those areas.

Lord's Resistance Army leader Joseph Kony and four other top LRA leaders have been indicted by the International Criminal Court on atrocities charges, including rape, mutilation and murder.