South Sudan Ugandan troops
Soldiers of the Uganda People's Defence Forces (UPDF) participate in the drills near the South Sudan border in 2014 AFP/Getty

Ugandan troops are leaving South Sudan as part of an agreement reached by warring sides in August. War in South Sudan erupted in 2013 when President Salva Kiir, from the Dinka ethnic group, accused then vice-president Riek Machar, from the Nuer group, of plotting to overthrow the regime.

The accusations sparked violence in the country, where factions loyal to Kiir and Machar engaged in tit-for-tat violence. The ceasefire, the latest in a long list of agreements subsequently broken with fresh violence from both sides, was reached in the capital Juba after Kiir initially refused to accommodate some of the rebels' request.

Uganda deployed troops – estimated to be more than 3,500 – in December 2013 to assist Kiir in the fight against the rebels, who repeatedly demanded that foreign troops leave the country. The Ugandan government announced on 12 October that its soldiers were ready to leave. The troops are supposed to be replaced by neutral forces.

"There is an agreement between the government of South Sudan and the government of Uganda that the UPDF (Uganda People's Defence Force) withdraw from South Sudan back to Uganda," South Sudan government spokesman Michael Makuei told AFP. "This process has started today.

As part of the peace deal, both sides agreed on the demilitarisation of Juba and the reinstatement of Machar as vice-president. South Sudan became the world's youngest nation after gaining independence from Sudan in 2011. Tens of thousands of people have been killed in the nation and hundreds of thousands displaced since 2013 with NGOs and the United Nations (UN) accusing both sides of committing war crimes.

In June, the UN mission in the country accused the Sudan People's Liberation Army SPLA of raping and burning alive dozens of girls during a major offensive. Reports also warned that both sides recruited child soldiers as young as 13 to use in combat.

Weeks after the two parties signed the latest agreement, General Johnson Oloni, head of the Shilluk militia, warned he might take up arms again after he alleged the government attacked civilians. He also expressed anger at what he perceives as the "wrongful" occupation of this tribe's land by the government and Kiir's recent decision to create 18 states in the country. Shilluk is the South Sudan's third largest tribe, after Dinka and Nuer.

When contacted by IBTimes UK, the South Sudanese embassy in London said the government is fully committed to the implementation of the peace agreement.