Khartoum- Sudan’s state news agency says that South Sudan’s President Salva Kiir and rebel opposition leader Riek Machar have signed a peace deal to share power in a transitional government, the latest effort to end a five-year civil war.

Sudan’s President Omar Al Bashir attended the signing ceremony Sunday in Sudan’s capital, Khartoum. Several African leaders also witnessed including the presidents of Uganda, Kenya and Djibouti.

The deal says that Kiir will head the government during the transitional period and Machar will return as First Vice President.

A similar arrangement fell apart in July 2016 when fighting erupted in the capital, Juba, and Machar fled the country.

South Sudan’s civil war erupted in December 2013 between supporters of Kiir and his then-deputy Machar. Tens of thousands have died in the war.