South Sudan's President Salva Kiir and rebel leader Riek Machar signed a peace agreement on Wednesday in the margins of a regional summit in Ethiopia.
South Sudan plunged into warfare two years after gaining independence from Sudan in 2011 when a political dispute between Kiir and Machar exploded into military confrontation.
A previous peace deal signed in 2015 fell apart a year later after clashes broke out between government forces and rebels, forcing Machar to leave Juba.
The new agreement, mediated by Sudan, reinstates Machar, a former vice-president, to his former role.
The United States, Britain and Norway, known as the Troika which oversees peace efforts, welcomed the signature of the deal by Kiir, Machar and other groups.
"We hope discussions will remain open to those who are not yet convinced of the sustainability of this agreement," they said in a statement. "We must seize this broader regional momentum to secure peace for the people of South Sudan."