South Sudan's government and rebels have signed a ceasefire agreement, pledging to halt fighting by today and end five weeks of bitter conflict that has left thousands dead.
The agreement was signed on Thursday in the Ethiopian capital Addis Ababa by representatives of South Sudan's President Salva Kiir and rebel delegates loyal to ousted vice-president Riek Machar, and was greeted by cheers from regional peace brokers and diplomats.
US President Barack Obama, whose country provided crucial backing on South Sudan's path to statehood, described the deal as "a critical first step toward building a lasting peace".
Mediators from the East African regional bloc IGAD, which has been brokering the talks, said the deal would put in place a verification and monitoring mechanism for the truce and allow unrestricted access to aid workers.
South Sudan's government also agreed to free 11 officials close to Machar who were detained after fighting between rival army units broke out on December 15.
The status of the detainees had been a major sticking point in the talks and Obama stressed that their participation would be "critical" to any future dialogue.
The fighting has been marked by atrocities committed by both sides, and more than half a million people have been forced from their homes during a wave of ethnic violence. Aid workers and analysts believe up to 10,000 people have died.
"These two agreements are the ingredients to create an environment for achieving a total peace in my country," said Taban Deng Gai, head of the rebel delegation.
He said he hoped the deal would pave the way for a serious national political dialogue aiming at reaching a lasting peace in South Sudan, which only won independence from Khartoum in 2011.
Government negotiator Nhial Deng Nhial said the talks, which have been dragging on in a hotel for three weeks, were "not easy".
"We hope to be able to make haste towards an agreement that will end bloodshed," he said, but voiced scepticism over the ability of the rebels, comprising renegade army units, ethnic militia and civilians, to stop the violence.
"What worries us is whether the agreement on the cessation of hostilities will stick [and] the capacity of the rebel group ... to stop fighting," he added. "We would ... urge the rebel group to heed the voice of reason and abandon the quest for political power through violence."
After initial clashes broke out in the capital Juba more than a month ago, the conflict rapidly escalated into all-out war between the regular army, who have been backed by Ugandan troops, and breakaway army units and other militia.
The violence took on an ethnic dimension as members of Kiir's Dinka tribe clashed with Machar's Nuer group, sending thousands to seek shelter in squalid camps or within UN peacekeeping bases.
On Monday, government forces recaptured the town of Malakal situated in the strategic oil-producing Upper Nile state and the last major settlement under rebel control. Large numbers of rebel forces, however, are still massed in rural areas and smaller towns.