President Kiir (left) and Mr Machar signed the deal at talks in Ethiopia's capital Addis Ababa
South Sudan's President Salva Kiir and rebel commander Riek Machar have signed a deal, committing to end the conflict that has devastated the country.
The ceasefire agreement was signed at talks in Ethiopia.
But consultations will continue on the contentious issue of a future government and power-sharing.
The conflict - which erupted in December 2013 - has displaced about 1.5 million people and earlier ceasefire deals have not lasted.
Coup allegation
"Complete cessation of hostilities in South Sudan is expected as of this morning (Monday)," said Seyoum Mesfin, a negotiator from the regional Igad bloc.
Many people are taking refuge in UN compounds in South Sudan
It is proposed that Mr Kiir would remain president in a new administration, while Mr Machar would be appointed vice-president, two African diplomats attending the talks told Reuters.
But the talks have now been adjourned until mid-February to allow the parties involved to consider the power-sharing arrangements, the BBC's Emmanuel Igunza in Addis Ababa reports.
A final agreement should be concluded by 5 March.
Clashes in South Sudan erupted several months after a decision by Mr Kiir in July 2013 to dismiss the entire cabinet and Vice-President Machar.
The president had accused Mr Machar of plotting a coup.
Mr Machar denied the allegation, but then raised a rebel force to fight government troops.
Some 10,000 people are estimated to have died in the fighting, which has mainly been between President Kiir's Dinka ethnic group and the Nuer group of Mr Machar.
Salva Kiir has led South Sudan, the world's newest state, since its independence from Sudan in 2011.