The United Nations has said that it will send peacekeepers home over a "lack of responsiveness" during a bloody attack on a UN-run camp in South Sudan in February.

UN peacekeeping chief Herve Ladsous acknowledged on Wednesday that an investigation had found "inadequacies" in peacekeepers' response when gunmen in military uniforms stormed the camp in the northeastern town of Malakal on February 17 and 18, firing on civilians and setting shelters ablaze.

The attack on the camp, where about 48,000 people were sheltering, left at least 40 dead and 123 wounded.

Nearly 20,000 people lost their homes after they were torched by the attackers based on the occupants' tribal affiliation.

"There was a lack of responsiveness by some, a lack of understanding of the rules of engagement by some," said Ladsous, who refused to single out any individuals.

INSIDE STORY: Is South Sudan finally on its way to peace?

"I will not name names but there will be repatriations of units and of individual officers."

At the time of the attack, the peacekeeping force was made up of contingents from Ethiopia, India and Rwanda.

"I can assure you that there will be a follow-up as there has been in other theatres of operation," Ladsous said.

Initial findings of an internal UN investigation found that "there was confusion with respect to command and control" and "a lack of coordination among the various civilian and uniformed peacekeepers" during the attack.

A UN military official in Malakal told Al Jazeera that Ethiopian peacekeepers had abandoned their posts during the attack.

The same official said that the peacekeeping contingent from Rawanda had asked, in writing, for permission to fire their weapons as the base came under attack, even though peacekeepers are licensed to use force to protect civilians. 

Inside Story: Is South Sudan finally on its way to peace?

"Attackers entered in the backyard of a UN base and proceeded to shoot and kill civilians and to systematically burn down large parts of the camp, as peacekeepers responded slowly and ineffectively," said Matt Wells, a senior adviser on peacekeeping at the Center for Civilians in Conflict.

The medical aid charity Doctors Without Borders said the UN had "failed in its duty to safeguard the people at the site and could have averted many fatalities".

Many of those who sought shelter at the UN site in Malakal arrived shortly after Sudan's civil war began in December 2013 after President Salva Kiir accused his former deputy Riek Machar, who he had sacked earlier that year, of plotting a coup.

Civil war broke out when soldiers from Kiir's Dinka ethnic group disarmed and targeted troops of Machar's Nuer ethnic group. Machar and commanders loyal to him fled, and tens of thousands of people died in the civil war that followed.

A peace agreement signed in August collapsed and fighting continues in many parts of the country, despite both leaders joining a unity government two months ago.

The attack in Malakal threatens to deepen the conflict further. Leaders of the Shilluk ethnic group, the third largest tribe in the country who hail from Malakal, say that if they are not given their land back, fighting could ensue.

Source: Al Jazeera and agencies