KHARTOUM (Reuters) - South Sudan’s government and rebels on Friday signed an accord on security arrangements after talks in Khartoum, witnesses said, a step that could lead to a power-sharing deal at a summit in Uganda on Saturday.

Slideshow ( 2 images )

The talks have been hosted by Sudan, from which South Sudan declared independence in 2011 after decades of bloodshed. South Sudan itself plunged into a devastating war two years later when a political dispute between President Salva Kiir and then-Vice President Riek Machar exploded into military confrontation.

Senior Sudanese government officials watched as envoys of Kiir’s administration and the rebels led by Machar signed the security arrangements agreement at Sudan’s defense ministry.

“With the signing of this agreement, it is time for our brothers in South Sudan to put aside their weapons and for South Sudan to achieve stability,” Sudanese Foreign Minister Al-Dirdiri Mohamed Ahmed told reporters.

He told Reuters that Kiir and Machar would reconvene in the Ugandan capital Kampala on Saturday to try to clinch a final peace deal. Sudanese President Omar Hassan al-Bashir and Uganda’s Yoweri Museveni will also attend those talks.

“We expect an agreement at this meeting on a power-sharing blueprint...We are optimistic regarding reaching a deal on power sharing in South Sudan,” Ahmed said.

There was no immediate comment from Kiir or Machar.

There have been repeated attempts to end the civil war that broke out in December 2013 in the world’s youngest nation.

Last month, Kiir signed a framework agreement with rebel leader Machar in Khartoum providing for a ceasefire, paving the way for talks toward a full treaty.

But rebels on the ground rejected some elements of the accord and both sides have accused each other of violating the truce, trading blame for attacks that have killed 18 civilians.

Sudanese army spokesman Brigadier General Ahmed Khalifa al-Shami said the security deal set four major goals - clearing population centers of armed forces, a time frame to unify and reorganize South Sudan’s military, setting up a joint security committee, and deciding on areas where forces are to be based.

The political row between Kiir and Machar reopened ethnic fault lines between the former’s Dinka people and the latter’s Nuer. The fighting has uprooted about a quarter of its 12 million population, gutted oil production and ruined an already widely impoverished economy.