Machar and President Salva Kiir have held weeks of talks in Khartoum in search of a comprehensive peace deal.
PIC: Former South Sudan vice-president Riek Machar had initially refused to sign the deal. (AFP)
KHARTOUM - South Sudan rebel chief Riek Machar has agreed to sign a final peace deal with the government to end a brutal civil war after initially refusing to ink it on Tuesday, a Sudanese mediator said.
Machar and President Salva Kiir have held weeks of talks in Khartoum in search of a comprehensive peace deal to end the conflict, which has killed tens of thousands and displaced millions since 2013 in the world's youngest country.
The warring parties have already inked several agreements, including a permanent ceasefire and a power-sharing deal that sees Machar returning as first vice president in the government.
But earlier on Tuesday in what was seen as a setback to ongoing peace efforts, Machar refused to sign the deal even as Juba inked it.
Hours later the Sudanese mediators announced that he had agreed to sign it.
"After intense negotiations by Sudanese mediators, Riek Machar agreed to sign the document on Thursday, August 30," Sudanese Foreign Minister Al-Dierdiry Ahmed told reporters.
Ahmed said Machar had expressed some reservations about the deal, which the mediators will forward to the regional East Africa bloc IGAD, which is leading the latest peace effort aimed at ending the civil war in South Sudan.
Machar and other rebel groups had initially refused to sign the draft, saying their reservations had not been acknowledged in the text.
The rebel groups had differences over the functioning of a proposed transitional government, how many states the country should be divided into and on the writing of a new constitution.
"For the first time, the opposition told us that it will not sign," Ahmed said, showing the draft text to reporters and diplomats who had gathered for what was expected to be a preliminary signing ceremony in Khartoum.
He said the text was the final document drafted after consulting all South Sudanese parties.
"South Sudan will not have peace unless these groups sign," Ahmed said.
The rebels had expressed surprise after the mediators drafted the final deal despite several outstanding issues that had to be resolved.
"This is an unfortunate development that will not reflect well on the impartiality of the mediators and will throw doubt into the whole process," the rebels said in a joint statement.
"We therefore urge the mediators to allow the parties to resolve these critical matters of contention."
The Sudanese minister had said the opposition's refusal to sign spelt the end of the current Khartoum round of talks.
"This was the last round of negotiation," Ahmed said, adding that the mediators would submit the text to IGAD, although it was unclear when the bloc's leaders would meet to discuss it.
Earlier this month, Kiir and Machar signed a power-sharing deal that will see the rebel leader return to the government as the first of five vice presidents.
That accord was to pave the way for a final peace deal and the formation of a transitional government that would hold power until elections are held.
But international backers of the peace process had raised doubts about whether the deal would stick given the depth of animosity between South Sudan's leaders which dates back to the 1990s when Machar first broke ranks at the height of the war for independence from Khartoum.
"Considerable challenges lie ahead, and we are concerned that the arrangements agreed to date are not realistic or sustainable," the United States, Britain and Norway said in a joint statement on August 10.
"Given their past leadership failures, South Sudanese leaders will need to behave differently and demonstrate commitment to peace and good governance," they said.
South Sudan finally became independent from Sudan in 2011, but a little over two years later a fresh war erupted pitting Kiir against Machar, his former deputy.
The conflict has seen widespread rape and murder of civilians, often along ethnic lines, and uprooted roughly a third of the population.
A succession of peace deals have been signed between the two leaders only to be broken, most recently in December.
Each time, the two sides have traded blame for the breakdown and the resulting bloodshed.