- UN Security Council warns of possible war crimes
- Number of dead estimated to be more than 270
- Chinese and Rwanda peacekeepers killed in attacks on UN compounds
South Sudan's President Salva Kiir has declared a "unilateral ceasefire and cessation of hostilities", and ordered government troops to "disengage" from fighting rival forces loyal to Vice President Riek Machar, following days of violence that left hundreds dead.
The order, which was announced on Monday by presidential spokesman Ateny Wek Ateny, was quickly reciprocated by Machar, who ordered his troops to stop fighting as of 17:00 GMT.
"The president talked to Machar ... they have talked about controlling their forces in an attempt to salvage what has remained of the peace agreement," Ateny said in an interview with Al Jazeera.
Monday witnessed some of the heaviest fighting between the two sides, after clashes erupted on Thursday.
The announcement of a ceasefire came as United Nations Secretary-General Ban Ki-moon called on the Security Council to impose an "immediate arms embargo" on the world's youngest independent state.
READ MORE: What's gone wrong in South Sudan?
Ban said he is "appalled by the indiscriminate attacks" on civilians, and condemned the "failed leadership" in the country, warning that some of the violence committed "may constitute a war crime.
"Yet again, the leaders of South Sudan have failed their people. Rarely has a country squandered so much promise so quickly," he said angrily from the UN headquarters in New York.
Earlier on Monday, renewed clashes broke out in the capital, forcing thousands of civilians to flee and raising fears of a slide back into all-out conflict in the five-year-old country.
At least 272 people have been killed in the recent violence, a health ministry source told the Reuters news agency on Sunday.
"As soon as the ceasefire was announced, everything fell silent," except for a brief celebratory gunfire, according to Al Jazeera's John Hendren, reporting from the capital.
Cancelled anniversary celebration
Following a localised firefight between rival military factions on Thursday night in Juba, major fighting broke out on Friday outside the presidential compound as President Kiir was meeting with Machar, a former rebel leader and currently first vice president.
The fighting quickly spread throughout the city. On Monday, the celebration marking the fifth anniversary of independence has been cancelled.
An Al Jazeera correspondent who was inside the presidential compound during that attack later saw bodies of soldiers on the lawn and reported that thousands of displaced residents were trying to find safety amid the chaos.
With the ceasefire declaration, the rival leaders must quickly work to save the country and order their armed forces to "disengage", Edward Thomas, author of a book on South Sudan, told Al Jazeera.
South Sudan was founded with optimistic celebrations in the capital on July 9, 2011, after it gained independence from Sudan in a referendum that passed with nearly 100 percent of the vote.
The country descended into conflict in December 2013 after Kiir accused Machar, his former deputy who he had sacked earlier that year, of plotting a coup.
Civil war broke out when soldiers from Kiir's Dinka ethnic group disarmed and targeted troops of Machar's Nuer ethnic group. Machar and commanders loyal to him fled to the countryside, and tens of thousands of people died in the conflict that followed. Many starved to death.
A peace agreement signed in August saw Machar rejoin the goverment and his forces re-enter Juba as the first step towards integration into a national army.
INTERACTIVE FEATURE: How far has South Sudan come since independence?
Source: Al Jazeera and agencies