South Sudan ceasefire agreement
South Sudan's rebel leader Riek Machar (R) and South Sudan's President Salva Kiir (L) exchange signed peace agreement documents in Addis Ababa Reuters

South Sudan's warring factions and leaders have vowed to end violence in the country and form a transitional government within 60 days.

The agreement was the result of a rare meeting in the Ethiopian capital Addis Ababa between former vice-president and rebel leader Riek Machar and South Sudan's President Salva Kiir.

The meeting was chaired by Ethiopia's prime minister Hailemariam Dessalegn, and it was mediated by the Inter-Governmental Authority on Development (IGAD).

Both leaders committed themselves to the formation of a transitional government and to ensuring unhindered humanitarian support to affected people with immediate effect, IGAD said.

Kiir and Machar reached a ceasefire deal earlier in February, but this failed to stem the violence as fresh fighting broke out shortly after.

Another ceasefire agreement was broken in May.

IGAD threatened both leaders it would apply sanctions if both parties do not respect the new agreement.

"If they don't abide to this agreement, IGAD as an organisation will act to implement peace in South Sudan," Desalegn said. "On that, we have different options including sanctions and [other] punitive actions as well.

"There has been a growing tendency to continue with the war," the prime minister added, criticising both factions for failing to abide with previous agreements.

After the meeting, Machar told Sudan Tribune that both leaders committed themselves to respecting the previous agreement and further negotiations on a peace agreement.

"We agreed on withdrawal of Ugandan troops," he added.

The withdrawal of Ugandan troops was a key request by the rebels, which refused to collaborate for a peace deal otherwise.