Former South Sudanese rebel leader Riek Machar has been sworn in as first vice-president, sealing a peace deal aimed at ending six years of civil war.
President Salva Kiir witnessed the moment at a ceremony at the State House in the capital, Juba.
It is hoped that the new unity government will bring an end to the conflict that has killed about 400,000 people and displaced millions.
However, previous deals were widely heralded only to fall apart.
Saturday's ceremony took place just before the deadline for an agreement expired.
"For the people of South Sudan, I want to assure you that we will work together to end your suffering," Mr Machar said after taking the oath.
He then embraced and shook hands with President Kiir.
"We must forgive one another and reconcile," said Mr Kiir. "I also appeal to the people of Dinka and Nuer (rival ethnic groups) to forgive one another."
Also present at the ceremony was the leader of Sudan, General Abdel Fattah al-Burhan.
Three other vice-presidents were also sworn in including Rebecca Garang, the widow of South Sudan's founding father, John Garang.
Under the agreement, the current cabinet has been dissolved to make way for more opposition members.
Correspondents say some issues remain unresolved including power-sharing and the integration of rebel fighters, but the two sides have agreed to form a government and address other matters later.
The deal was announced hours after the UN released a damning report accusing both sides of deliberately starving civilians during their struggle for power.
What's the significance of the agreement?
President Kiir has expressed hope that the transitional three-year period will pave the way for refugees and internally displaced people to return to their homes.
In addition to those killed or displaced, many others have been pushed to the brink of starvation and faced untold suffering.
If the deal holds, it could herald a fresh start in the world's newest country.
What is the fighting about?
South Sudan became an independent state from Sudan in 2011, marking the end of a long-running civil war. But it did not take long for the promise of peace to crumble.
Just two years after independence, the country returned to violent conflict after President Kiir sacked Machar, then the deputy president in December 2013.
President Kiir had accused Mr Machar of plotting a coup to overthrow him, which Mr Machar denied.
While the war had political origins, it also has ethnic undertones and is based on power dynamics.
The Dinka and Nuer, South Sudan's two largest ethnic groups, which the two leaders belong to, have been accused of targeting each other in the war, with atrocities committed by both sides.
Why has it been so hard to strike a deal?
Parties had been unable or unwilling to agree on the terms for the formation of a transitional government, in line with the revitalised peace agreement of 2018.
The deal was supposed to have been finalised by May 2019 but was postponed twice - the latest deadline being 22 February.
The conflict has pushed the country into a catastrophic humanitarian crisis.
Despite the situation, it has been difficult for the parties to reach and maintain a peace deal that could stabilise the country.
The two main leaders have a mutual distrust of each other and there has not been a cordial working relationship since President Kiir fired Mr Machar in 2013.
Mr Machar has never returned permanently to the capital, Juba, fearing for his safety. He fled the country when his forces were engaged in fierce clashes with government troops as the 2016 peace agreement collapsed.
What is life like in South Sudan?
It is pretty bleak. The International Monetary Fund (IMF) ranks the country as the poorest in the world, by GDP per person. Much of the country is not developed in terms of infrastructure. It has, for instance, just about 300km (186 miles) of paved roads in a country that stretches more than 600,000 sq km.
Most parts of the country outside the urban centres have no electricity or running water.
World's youngest country
2013Civil war started
4.3mPeople forced from their homes
12mPeople in the country
82%Of people live on less than $1 a day
65%Of the population unable to read and write
South Sudan also has one of the lowest literacy rates in the world at 34.5%, according to Unesco (2018).
The UN children's organisation, Unicef, estimates that 70% of children (about 2.2 million) are out of school - risking their future and that of their country. This represents one of the highest rates of out-of-school children in the world.
Globally, South Sudan has the fourth lowest human development indices despite its huge natural resource potential, such as fertile agricultural land, gold, diamonds and petroleum. (UNDP's Human Development Index measures the average achievements in human development: a long and healthy life, knowledge and decent standard of living.)
As of 2019, more than half of the population required humanitarian assistance, with extreme levels of acute food insecurity across the country, according to the World Bank.
The country is almost solely dependent on oil revenues and there is very little investment in other sectors such as agriculture and infrastructure.
Does the deal guarantee lasting peace?
There are certainly no guarantees.
More than 10 agreements and ceasefires have been reached since the two leaders fell out in 2013, and their inability to sustain any deal, including on power-sharing, has been at the heart of the conflict.
Peter Adwok Nyaba, an activist and former minister in South Sudan, says in a 2019 advisory that the agreement does not fully address the conflict elements of ethnic nationalism, power struggles and weak institutions of governance, which he says remain alive despite the deal.
"This is a typical vicious circle: poverty-conflict-peace lack of development then conflict," he says.