South Sudan's rival leaders say they have agreed to form a coalition government just two days before a deadline.
The announcement is a major step in the country's emergence from a five-year civil war that killed nearly 400,000 people.
The rival leaders had twice missed deadlines in the past year to form the transitional government that is expected to lead to elections in three years' time.
Opposition leader Riek Machar told reporters in the capital Juba that he and President Salva Kiir agreed that after the government's formation they will resolve any outstanding issues laid out in a September 2018 peace deal.
Machar said he is confident they will address them all.
Kiir said the new government will be formed on Saturday and he will appoint Machar as his first vice president, or top deputy, on Friday.
That arrangement has twice led to conflict - once when the civil war erupted in late 2013 and again in mid-2016 after Machar returned to the post under a previous peace deal. He ended up fleeing the country on foot.
The president said security arrangements will be resolved after the government's formation.
He said the protection of Machar and others with the opposition will be under his responsibility.
Another politically sensitive issue, the number of states, appears to have been resolved after Kiir over the weekend announced a "painful" compromise of 10 plus three administrative areas, down from 32.
The changes are for the sake of peace to prevail, Kiir said on Thursday, also calling on the more than 2 million people who fled South Sudan during the conflict to finally come home.
Australian Associated Press