South Sudan’s President Salva Kiir has ordered a ceasefire after days of intense fighting with former rebels in the capital, Juba, state TV says.
More than 200 people are reported to have died in the clashes, involving heavy artillery, tanks and helicopters.
The violence erupted with a shootout between forces loyal to President Kiir and first Vice-President Riek Machar.
The UN Security Council had urged both sides to stop fighting, amid fears for the safety of millions of civilians.
In a unanimous statement, the council condemned the violence “in the strongest terms” and expressed “particular shock and outrage” at attacks on UN sites. It also called for additional peacekeepers to be sent to South Sudan.
President Kiir’s ceasefire order came into effect at 1800 local time (1500 GMT) on Monday. It is not clear if the clashes have subsided.
There has not yet been any response to the ceasefire order from Mr Machar or his spokespeople.
Earlier in the day, residents of Juba told the BBC they were staying indoors amid reports of looting and the sound of gunfire from the streets.
There were also reports of tanks on the streets of Juba and of clashes close to the airport. The US embassy warned of “serious fighting” taking place.
The BBC’s South Sudan analyst, James Copnall, says the latest clashes have traumatised Juba and shredded a peace deal between Mr Kiir and Mr Machar, agreed last August.
He said there were also doubts over how far both men were in command of their forces. Both leaders had called for calm last Friday, but the fighting carried on.
On Monday afternoon, an army spokesman told the BBC that soldiers loyal to Mr Kiir had been ordered back to barracks.
Any who resisted the order, by loitering or looting, would be arrested, he said.
Chinese media say two Chinese UN peacekeepers have died in the latest clashes in Juba. Several other peacekeepers have been injured, as well as a number of civilians who have been caught in crossfire.
A UN spokeswoman in Juba, Shantal Persaud, said the fighting had prompted hundreds of internally displaced people to seek refuge in UN premises.
She said both South Sudanese leaders were responsible for implementing last year’s peace agreement, which included a permanent ceasefire and the deployment of forces away from Juba.
Why has fighting resumed?
It seems a disagreement at a checkpoint between rival soldiers led to a shootout on Thursday night in which five soldiers died. This quickly escalated into serious fighting from Friday onwards. Tensions have been high since April, when Mr Machar returned to Juba under a peace deal following a two-year civil war. He took a 1,300-strong protection force with him and they were supposed to start joint patrols with forces loyal to President Kiir. But a lack of trust between the two sides means the patrols have not begun.
Will it become a new civil war?
There are concerns that what we are seeing is a repeat of what happened in December 2013. The two-year civil war started after clashes between rival soldiers in Juba and degenerated into nationwide conflict in which tens of thousands died. The war was fought broadly between South Sudan’s biggest ethnic groups – the Dinka, led by Mr Kiir, and the Nuer, under Mr Machar.
What can the international community do?
The international community played a major role in the creation of South Sudan and has tried to exercise some influence since independence in 2011. The UN and US have called for an immediate end to fighting, a call echoed by the East African regional group which brokered the recent peace deal.