South Sudanese President Salva Kiir and rebel leader Riek Machar on Wednesday signed a "preliminary" power-sharing deal, with a Sudanese minister saying it reinstates Dr Machar as first vice president in a bid to end the civil war.
"Salva Kiir will continue as president of South Sudan and Riek Machar will be the first vice president," Sudanese Foreign Minister Al-Dierdiry Ahmed said at a ceremony held in Khartoum to sign the accord.
"There will be four other vice presidents shared between other political groups," Ahmed said, announcing the details of a much-delayed power-sharing pact between South Sudan's warring groups.
The rival groups have already agreed on a permanent ceasefire and withdrawing of their forces from civilian areas.
On July 7 they agreed on a power-sharing deal but its signing was delayed due to differences over the contents of the accord.
The "preliminary" deal sealed Wednesday should be followed by a final one on August 5, Mr Ahmed said at the signing ceremony witnessed by journalists.
"The power-sharing document has been signed and it addresses all pending issues during the transitional term," Mr Ahmed said.
Once a final peace deal is signed it will give the foes three months to form a transitional government under the new format, which will then hold power for a further 36 months.
Ahmed said one issue that still needed to be resolved was how to share power at the level of regions and counties.
"The negotiations on this will continue until we have an agreement," he said, adding that some opposition groups had refused to sign Wednesday's document but discussions with them were also continuing.
The deal signed on Wednesday stipulates that there will be 35 ministers in the transitional government — 20 from Kiir's group and nine from Machar's, while the rest will represent other groups.
The parliament will consist of 550 lawmakers, including 332 from Kiir's group and 128 from Machar's faction.
Ahmed said an independent commission will also be formed to decide on the number of provinces in the country.
A similar deal was signed in 2015 but fell apart a year later in a deadly battle that saw Machar flee into exile.
The war in South Sudan erupted in December 2013 after Kiir accused his former deputy Machar of plotting a coup.
The conflict has already killed tens of thousands of people and forced millions from their homes.