South Sudan's government and rebels have signed a ceasefire agreement after talks in Ethiopia.
Under the deal, signed in a hotel in the Ethiopian capital Addis Ababa, the fighting is due to come to an end within 24 hours.
However, the South Sudanese government has expressed scepticism over whether the opposition will be able to control all the militia involved in fighting.
The BBC reports that more than half a million people have been forced from their homes during the month-long conflict.
The agreement brokered in Ethiopia is thought to address the issue of 11 detainees the rebels wanted freed, and whose fate had previously left talks deadlocked.
The conflict began as a political squabble between President Salva Kiir and his former deputy Riek Machar year, but rapidly took on an ethnic dimension in line with the politicians' power bases.
Fighting erupted in the South Sudan capital, Juba, in mid December and quickly escalated, with reports of ethnic killings. Figures for the number of people killed are difficult to verify, but Reuters reports that it may be in the thousands.
Last week, the UN human rights chief said both government soldiers and rebels had committed atrocities in South Sudan, one of the world's poorest countries.