UN chief sacks peacekeeping force commander as troops are accused of failing to protect civilians during July’s clashes.

UN Secretary-General Ban Ki-moon has sacked the commander of a peacekeeping force in South Sudan following a damning report that accused the blue helmets of failing to protect civilians during an outbreak of violence in July.

The report from a United Nations special investigation found that a lack of leadership in the UN mission, known as UNMISS, culminated in a “chaotic and ineffective response” during the heavy fighting in the capital Juba from July 8 to 11 that killed dozens of people.

Peacekeepers abandoned their posts and failed to respond to pleas for help from aid workers under attack in Terrain Hotel, less than a mile from a UN compound, according to the report. About 12,000 UNMISS peacekeepers were in the country at the time.

Ban’s spokesman, Stephane Dujarric, said the UN chief had “asked for the immediate replacement of the force commander”, Lieutenant-General Johnson Mogoa Kimani Ondieki.

READ MORE: South Sudan – A country captured by armed factions

Al Jazeera’s James Bays, reporting from the UN in New York, said the UN would now try to identify those responsible for the security failings, and it would then be up to China, India, Ethiopia and Nepal to discipline their troops stationed in the country for not fulfilling their duties.

UN peacekeepers have been deployed to South Sudan since the country gained independence from Sudan in 2011.

The world’s newest country descended into war only two-and-a-half years later when President Salva Kiir accused his deputy Riek Machar of plotting a coup.

Soldiers from Kiir’s Dinka ethnic group disarmed and targeted troops of Machar’s Nuer ethnic group, as tens of thousands of people died in the conflict that followed. Many civilians also starved.

The rivals signed a peace agreement late last year, under which Machar was once again made vice president, but renewed fighting has seen Machar go into hiding, and a member of his opposition – Taban Deng Gai – take his place as First Vice President.

In September, South Sudan agreed to allow 4,000 additional UN peacekeepers to enter the country, after first rejecting the regional protection force as a breach of national sovereignty.