South Sudan rivals Salva Kiir and Riek Machar strike unity deal
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.