Khartoum, Aug 29 (AFP) 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 yesterday, 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 yesterday 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. (AFP) GVS

(This is an unedited and auto-generated story from Syndicated News feed, LatestLY Staff may not have modified or edited the content body)