What you need to know:
- On September 12, 2018, Machar and Kiir sign a new peace agreement to end a war that has killed nearly 400,000 people and displaced roughly four million.
- The deal paves the way for a power-sharing government which, after much delay concerted international pressure, is eventually installed in February 2020, with Machar reinstated as vice president.
South Sudan's leaders have announced they will remain in power two years beyond an agreed deadline, sparking criticism from foreign partners.
Here's a look at the tragic history of the world's newest nation.
2011: New nation
On July 9, South Sudan proclaims itself independent from Sudan following six years of autonomy and decades of war.
The president is Salva Kiir, with Riek Machar as his deputy. The rivals, who belong to two different ethnic groups, led the Sudan People's Liberation Movement (SPLM) that spearheaded the push for independence.
2013: Civil war
Kiir fires Machar and all government ministers, their deputies and several police brigadiers on July 23.
After a night of fighting in the capital Juba, Kiir says on December 16 his forces had thwarted an attempted coup by Machar, who denies the claim.
The fighting spreads beyond the capital, fuelled by rivalries between Kiir's Dinka group and Machar's Nuer.
It sets off tit-for-tat massacres, spiralling into five years of war.
2016: Leader in exile
Machar and Kiir sign a peace accord in August 2015.
Machar returns to Juba and is sworn in as vice president on April 26, 2016.
But fighting between supporters of both leaders breaks out again in July. Machar goes into exile, accusing Kiir of trying to have him killed.
2018: Peace deal
Kiir and Machar meet for the first time in two years on June 20.
On September 12 they sign a new peace agreement to end a war that has killed nearly 400,000 people and displaced roughly four million.
The deal paves the way for a power-sharing government which, after much delay concerted international pressure, is eventually installed in February 2020, with Machar reinstated as vice president.
2021: Violence continues
However, armed violence remains widespread, with recurring bloodshed beween rival ethnic groups, and an insurgency in the country's south displacing hundreds of thousands of people.
The UN several times extends its peace mission, as well as an arms embargo.
A UN report in April warns that the slow pace of implementing the peace accord risks a relapse into "large-scale conflict".
On May 8, after a delay of more than a year, Kiir includes opposition lawmakers in a new parliament.
2022: Extension of power
In March, the UN accuses the government of rights violations amounting to war crimes over attacks in the southwest last year, calling for investigations against dozens of individuals, including for abuses against children.
The same month, the UN's World Food Programme (WFP) warns that over 70 percent of South Sudan's 11 million people will face extreme hunger this year because of natural disasters and violence.
In April, Kiir and Machar agree on the creation of a unified armed forces command, a key provision of the peace deal after years of deadlock.
Four months later, they announce that the transitional government will remain in power two years beyond the agreed deadline, in a move foreign partners warned lacked legitimacy.
Martin Elia Lomuro, the minister of cabinet affairs, says the decision was taken "to address the challenges that impede the implementation of the peace agreement".
But the United States, Britain and Norway boycott the announcement, expressing concern that the extension did not involve consultations with civil society or international partners, among other groups.