A day after President Salva Kiir dissolved the previous government, opposition leader Riek Machar was sworn in as his deputy, an arrangement that twice collapsed in fighting during the conflict that has killed nearly 400,000 people.
Kiir declared "the official end of the war, and we can now proclaim a new dawn".
Peace is "never to be shaken ever again," the president said, adding that he had forgiven Machar and was asking for Machar's forgiveness, to applause. He called on their respective Dinka and Nuer ethnic groups to do the same.
The world's youngest nation slid into civil war in 2013, two years after winning its long-fought independence from Sudan, as supporters of Kiir and Machar clashed. Numerous attempts at peace failed, including a deal that saw Machar return as vice president in 2016 - only to flee the country on foot months later amid fresh gunfire.
Intense international pressure followed the most recent peace deal in 2018. Pope Francis in a dramatic gesture kissed the feet of Kiir and Machar last year to coax them into putting differences aside. Saturday's ceremony began with a presentation to them of that photo as a reminder.
Comprimise ahead of nearing deadline
Exasperation by the United States, South Sudan's largest aid donor, and others grew as Kiir and Machar in the past year pushed back two deadlines to take the crucial step of forming the coalition government. But with less than a week before the latest deadline on Saturday, each made a key concession.
Kiir announced a "painful" decision on the politically sensitive issue of the number of states, and Machar agreed to have Kiir take responsibility for his security.
On Thursday, they announced they had agreed to form a government meant to lead to elections in three years' time - the first vote since independence.
"Finally, peace is at our doorstep," a reporter with the UN-backed Radio Miraya declared from Bor in long-suffering Jonglei state. In Yambio, youth with flags were reported in the streets.
Hugs and applause followed Machar's swearing-in. He vowed to South Sudanese to work together "to end your suffering".
Both he and Kiir thanked the pope for his gesture. "We are proud to report to him that we have also reconciled," Kiir said. "We were greatly humbled and challenged" by him, Machar said.
Even as citizens breathed a careful sigh of relief, aid groups, analysts and diplomats warned of major challenges ahead. In a likely sign of caution, no heads of state aside from Sudanese transitional sovereign council leader, General Abdel-Fattah Burhan, attended the swearing-in.
Officials from Sudan have mediated talks between the rivals in recent months. The South Sudanese capital Juba has also been the seat of negotiations between the Sudanese transitional government and rebel groups.
"While much work remains to be done, this is an important milestone in the path to peace," the US Embassy said in a message of congratulations. UN Secretary-General Antonio Guterres called it a "significant achievement".
Worries over famine, rights abuses and fragile peace
Tens of thousands of rival forces still must be knitted together into a single army, a process that the UN and others have called behind schedule and poorly provisioned.
Observers have stressed that this new government must be inclusive in a country where fighting has often occurred along ethnic lines and where several armed groups operate. Not all have signed on to the peace deal.
Kiir and Machar have said outstanding issues will be negotiated under the new government.
Other vice presidents named by Kiir on Friday include Taban Deng Gai, a former ally of Machar who switched to the government side and last month was sanctioned by the US over involvement in serious human rights abuses. Another is Rebecca Garang, the widow of John Garang, who led a long fight for independence from Sudan.
The humanitarian community, which has seen more than 100 workers killed since the civil war began, hopes the new government will lead to far easier delivery of food and other badly needed support as roughly half of South Sudan's population of 12 million remain hungry. Some 40,000 are in famine conditions, a new report said Thursday, and now a major locust outbreak in East Africa has arrived.
Another more than 2 million people fled South Sudan during the civil war, and Kiir has urged them to come home.
The UN Commission on Human Rights in South Sudan warns that serious abuses continue.
"Civilians are deliberately starved, systematically surveilled and silenced, arbitrarily arrested and detained and denied meaningful access to justice," its latest report said on Thursday. It said scattered deadly violence, the use of child soldiers and sexual violence imperil the fragile peace.
The Sentry, an investigative team that has alleged corruption among some South Sudanese officials, urged the international community to keep up pressure.
"Years of conflict have bred deep distrust among South Sudan's politicians, heightening the potential for a return to civil war," it said on Friday. "The ability to hold South Sudan's politicians accountable throughout the process, rather than waiting until it is too late, is essential to the survival of the peace agreement."
As some analysts said the threat of further sanctions pushed Kiir and Machar to make peace once more, envoys from neighbouring Sudan, Kenya and Uganda in remarks after the swearing-in called for the lifting of existing sanctions, to applause.
Follow us on Facebook, Twitter and Instagram to stay connected