Ceasefire deal in South Sudan signed by government and rebels

South Sudan''s government spokesperson, Ateny Wek, talks to the media in Juba on January 22, 2014.

South Sudan's government and rebels have signed a ceasefire to end more than five weeks of fighting that divided Africa's newest nation and brought it to the brink of civil war.

Fighting between troops loyal to President Salva Kiir and those backing the vice president he sacked in July, Riek Machar, erupted in mid-December.

Thousands of people have been killed and more than half a million people have fled their homes, prompting the regional grouping of nations, IGAD, to initiate peace talks.

The pact is expected to be implemented within 24 hours of the signing, mediators said.

But making the ceasefire hold could test Machar, whose forces include loyalists as well as more autonomous groups battling the centrally controlled government forces.

"The crisis that gripped South Sudan is a mere manifestation of the challenges that face the young and fledgling state," Seyoum Mesfin, IGAD's chief mediator, told the signing ceremony.

"I believe that the postwar challenges will be greater than the war itself. The process will be ... unpredictable and delicate."

South Sudan's defence minister, Kuol Manyang Juuk, told Reuters on Jan. 17 before the deal was reached that Machar did not have enough control to make a ceasefire stick in the oil-producing nation, one of Africa's poorest.

"To the parties, we say: Enough! The killing must end now. The displaced must be able to return to their homes," said Alexander Rondos, the European Union's special representative for the Horn of Africa, at the signing event.

The conflict has turned along ethnic faultlines, pitting Machar's Nuer against Kiir's Dinka people. Several other communities have also taken up weapons. Analysts say the ceasefire does not resolve the broader power struggle.

"It is only the first step to allow space and time for a more substantive political dialogue to take place," said Douglas Johnson, a historian and author.