Rebel leader is to return to his position as one of the country's four vice presidents, Sudan's foreign minister says.

South Sudan’s warring parties have agreed to a power-sharing agreement according to which rebel leader Riek Machar will be reinstated as vice president.

The deal was reached in the Ugandan capital, Kampala, in an attempt to end South Sudan's civil war, which broke out in 2013 after a political dispute between President Salva Kiir and Machar turned violent.

The two sides have been involved in a cycle of retaliatory killings that have split the impoverished country along the ethnic lines. Tens of thousands have been killed and millions displaced in the conflict.

New proposal was "accepted by the government" and that the opposition side had accepted the deal "in principle" but would "consider it and come up with the final position" following further talks.

A similar deal, that returned Machar to the vice presidency, was reached in 2015 but fell apart a year later in a deadly clash which forced Machar into exile.