A top South Sudanese general has resigned from his post after accusing the country's leadership of perpetrating ethnic-based violence in the war-torn country. Lieutenant General Thomas Cirillo Swaka, deputy head of logistics, claimed the country's Sudan People's Liberation Army (SPLA) had become a "partisan and tribal army".

The South Sudan conflict erupted in 2013 when President Salva Kiir, of the Dinka ethnic group, fired his deputy Riek Machar, who then became a rebel leader, from the Nuer group.

Ethnic-related violence targeting Dinka and Nuer has killed an estimated 50,000 people, amid allegations of crimes against humanity committed by both sides, including rape, torture and the use of child soldiers.

"President Kiir and his Dinka leadership clique have tactically and systematically transformed the SPLA into a partisan and tribal army.

"Terrorizing their opponents, real or perceived, has become a preoccupation of the government," Swaka claimed in a letter, according to Reuters.

"Soldiers from the Dinka ethnic group have been strategically deployed and posted in non-Dinka areas to support the policy of land occupation," the general continued.

Both Kiir's press secretary and the South Sudanese embassy in London have not replied to a request for comments on the allegations. However, the BBC reported on 13 February that Kiir had denied the claims.

Swaka's resignation came weeks after the UN warned the country was on the verge of a Rwanda-style genocide. Meanwhile, the UN refugee agency (UNCHR) warned that at least 1.5 million people have fled the country, with Uganda hosting the majority of refugees.

Those internally displaced are facing severe food shortages due to a man-made famine.

Machar fled South Sudan following deadly fighting in capital Juba in July 2016.

He is currently in South Africa, where he said he is seeking medical treatment, but in an exclusive talk with IBTimes UK said he was ready "to go home".

His wife, Angelina Teny, also a member of SPLM-IO, told IBTimes UK she believes her husband can contribute to achieve peace in the war-torn nation,