The agreement, initialed Wednesday, will be signed on August 5, Sudan's Foreign Minister Al Dirdiri Mohamed Ahmed said. There was no immediate comment from the armed opposition.
Officials announced that South Sudan's warring leaders have agreed to share power once again in a transitional government in the latest effort to end a five-year civil war.
South Sudan's information minister, Michael Makuei Lueth, announced the agreement between President Salva Kiir and armed opposition leader Riek Machar to reporters in Sudan's capital, Khartoum.
The agreement, initialed on Wednesday, will be signed on August 5, Sudan's Foreign Minister Al Dirdiri Mohamed Ahmed said. There was no immediate comment from the armed opposition.
The "preliminary" deal sealed on Wednesday should be followed by a final one on August 5, Sudan's Foreign Minister Al Dierdiry Ahmed said at the signing ceremony in Khartoum witnessed by journalists.
Khartoum, as part of regional efforts to end the conflict in the world's youngest country, has hosted a round of peace talks since June between South Sudan's warring leaders President Salva Kiir and rebel chief Machar.
The rival groups have already agreed on a permanent ceasefire and withdrawing of their forces from civilian areas.
Kiir will lead South Sudan's government during the transitional period and Machar will return as first vice president, Sudan's official SUNA news agency reported.
Apart from Machar, Kiir will have four more deputies during an interim period under the agreement that was guided by Sudan and other east African nations.
Machar will be among five vice presidents in the new transitional government, according to the 11-page agreement. The warring sides also have agreed to share a 550-seat parliament, 332 from Kiir's group and 128 from Machar's faction.
The deal 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.
On July 7, they agreed on a power-sharing deal but its signing was delayed due to differences over the contents of the accord.
A similar arrangement, however, fell apart in July 2016 when fighting erupted in the capital, Juba, and Machar fled the country on foot.
The civil war broke out in December 2013 between supporters of Kiir and his then-deputy Machar.
Tens of thousands of people have been killed since then, with more than two million fleeing the country in Africa's largest refugee crisis since the Rwandan genocide in 1994. Millions of others have been left in near famine.
Multiple ceasefires, including a "permanent" one signed by Kiir and Machar weeks ago, have been violated within hours. Meanwhile, both sides have been accused of abuses. A UN report earlier this month described how government troops and allied forces hung people from trees, burned others alive and raped or gang-raped dozens of women and girls.
Sceptics speak up
The new agreement comes as South Sudan's leaders are under growing pressure from an impatient international community to end the fighting. Under the threat of a UN arms embargo Kiir and Machar agreed to resume talks in June, their first face-to-face discussions in nearly two years.
Earlier this month the UN Security Council imposed the arms embargo anyway.
The US earlier this week said it was "sceptical" that Kiir and Machar can oversee an end to the fighting.
Some South Sudanese who have seen past peace deals come and go reacted to the latest news with wariness.
"Working relations between Kiir and Machar is at its lowest level ever and chances of the duo causing another regrettable wave of violence are high," said Wol Deng Atak, the editor of a newspaper that was forcibly shut down by the government and who now lives in exile.
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.