South Sudan President Salva Kiir signs peace deal Published duration 26 August 2015

image copyright AFP image caption Salva Kiir wanted regional leaders to acknowledge his reservations

South Sudan's President Salva Kiir has signed a peace deal with rebels after a threat of sanctions from the UN.

He told those gathered for the signing ceremony in the capital, Juba, that he had "reservations" about how the mediation was conducted and some of the clauses in the compromise deal.

Rebel leader Riek Machar signed the deal last week but Mr Kiir refused.

It is meant to end months of brutal civil war and will see Mr Machar return as vice-president.

Fighting between forces loyal to the two men over the last 20 months has forced more than 2.2 million people from their homes in the world's youngest state, which broke away from Sudan in 2011.

The United States welcomed the agreement but said that it did not "recognise any reservations" that President Kiir had highlighted at the signing ceremony.

In a statement, the US National Security Advisor Susan Rice said that reaching a lasting peace would "require commitment and resolve from all parties to the conflict".

The leaders of Kenya, Uganda and Ethiopia, who all helped mediate the negotiations, witnessed the signing.

One of the two generals who defected earlier this month from the rebel side has condemned the peace deal, saying it is "not for the whole of South Sudan".

"If they don't listen to us, they'll listen to the bullets," General Gathoth Gatkuoth told the BBC, referring to both the government and the rebels.

At the scene: Alastair Leithead, BBC News, Juba:

image copyright AFP

As time passed and the temperature rose in the big, celebratory tent, the buzz of optimism started to wane.

Last-minute talks had been going on for hours - surely President Salva Kiir wouldn't leave regional heads of state at the altar for the second time in 10 days?

The talking had been tough - the language of the leaders was strong.

When Kenya's President Kenyatta said there was "no such thing as a perfect agreement", it was clear it had been a tough day around a table.

People shouldn't see "obstacles, but opportunity and hope," he added.

Uganda's Yoweri Museveni called South Sudan's struggle for independence a just war, but that this was "the wrong war in the wrong place at the wrong time".

And then in a long, slow speech, pausing regularly to remove his glasses and wipe his face, it wasn't quite clear if President Kiir was going to sign the deal or not.

In the end he did, but any moment of statesmanship was lost in a piece of theatre.

He finally said he would sign only if the heads of state initialled a long list of reservations - which he then proceeded to do while photocopies of the list were handed out to the audience.

The regional leaders declined, but the signing went ahead. With renegade generals not signing up to the deal and much picking still to be done over the detail, there's little here that would make the 1.6 million displaced people in South Sudan rush home.

Before signing the deal, President Kiir spent hours in a closed-door meeting with the regional leaders.

Afterwards, he addressed the delegates, speaking at length of his unease about the deal and saying he wanted these reservations to be on record.

During his speech, South Sudan's president mentioned areas such as the ambiguous structure and command of the South Sudan forces once the transitional government takes office in 90 days.

He also had issues about the power-sharing arrangements.

Fresh fighting that has erupted in the oil-rich town of Bentiu was a clear indication that rebels did not respect the deal they had so recently signed, he added.

Key points of peace deal:

image copyright AFP

Fighting to stop immediately. Soldiers to be confined to barracks in 30 days, foreign forces to leave within 45 days, and child soldiers and prisoners of war freed

All military forces to leave the capital, Juba, to be replaced by unspecified "guard forces" and Joint Integrated Police

Rebels get post of "first vice-president"

Transitional government of national unity to take office in 90 days and govern for 30 months

Elections to be held 60 days before end of transitional government's mandate

Commission for Truth, Reconciliation and Healing to investigate human rights violations

At least seven ceasefires have been agreed and then shattered - sometimes within hours.

Fighting broke out in December 2013 after President Kiir accused his sacked deputy Mr Machar of plotting a coup.

Mr Machar denied the charges, but then mobilised a rebel force to fight the government.

image copyright AFP image caption More than 2.2 million people have been driven from their homes

image copyright AFP image caption Riek Machar has been a central figure in Sudanese and South Sudanese politics for three decades

Earlier in a Security Council briefing, the UN's humanitarian chief Stephen O'Brien warned that conditions in South Sudan were deteriorating, saying he had heard multiple accounts of atrocities, including people being burned in their homes.

"The scope and level of cruelty that has characterised the attacks against civilians suggests a depth of antipathy that goes beyond political differences," he said.

A US-drafted resolution would have imposed an arms embargo and targeted sanctions unless Mr Kiir signed.