Sudanese Minister of Foreign Affairs and chief mediator for the Khartoum Round of the South Sudan peace revitalisation process, El-Dirdeiry Mohamed Ahmed, arrived in Juba, the capital of South Sudan, yesterday to meet with President Silva Kiir Mayardit.
Sudan's official SUNA news agency says Kiir will head the government during the transitional period and Machar will return as first vice president.
Held at Friendship Hall in Khartoum, the ceremony was graced by Museveni, Sudan leader Omar Al Bashir, Kenya's Uhuru Kenyatta of Kenya, Ismail Omar Guelleh of Djibouti, Somali Prime Minister Hassan Ali Kheire and Ethiopian Deputy Prime Minister, Demeke Mekonnen.
South Sudan became independent from Sudan in 2011, but civil war broke out two years later between the government led by Kiir and a rebel movement led by Machar.
Mr Kiir said on Friday he was more confident that the current deal would work because it had not been "forced on us" unlike previously.
"Somebody said that the devil sometimes is embedded in the implementation".
The rival groups have already agreed on a permanent ceasefire and withdrawing of their forces from civilian areas, in talks mediated by Khartoum in series of dialogues hosted by al-Bashir.
President Salva Kiir's team will take 20 positions in the new 35-member government, 9 positions will go to Machar's group and the rest will go to other small opposition groups.
But he highlighted several challenges going forward, especially in accommodating a bloated government.More news: Saudi Arabia to freeze new trade with Canada, recalls ambassador
More news: Trade War: Trump says tariffs are working
More news: Concerns Of Dam Failure Prompt Evacuations In Lynchburg, Va.
"See the size of the parliament, see the size of the cabinet".
"We, however, remain committed to the strategic partnership between our country and theirs and we will not give up", Raila said on his Twitter page.
Almost five years of war have seen South Sudan's oil production plummet to about 120,000 barrels a day from a peak of 350,000, according to the World Bank.
Washington has been sceptical about the success of the latest peace initiative, given the fiery enmity between Kiir and Machar.
Sudan helped broker the agreement.
"In fact, such an agreement may sow the seeds of another cycle of conflict", it said.
But on Sunday the top U.S. envoy to Khartoum said the United States still backed the process.
The United Nations said the power-sharing deal was a "significant step".
The UN estimates that about 4 million South Sudanese have been displaced internally and externally.