An attack on a UN peacekeeping base in South Sudan where some 5,000 members of an ethnic minority had sought shelter killed 58 people and injured about 100 others, a UN official said Friday.

An angry mob of youths attacked the UN peacekeeping mission's camp in Bor in Jonglei state on Thursday where ethnic Nuers fled after fighting broke out in the country in mid-December.

The UN official, speaking on condition of anonymity ahead of a formal announcement, said most of the 58 people killed were Nuer but there were also casualties on the other side. Initial reports said 12 people were killed.

UNICEF, the UN children's agency, said an unknown number of children were among the dozens of civilians injured and killed in the attack.

"Utterly defenceless children were attacked in a place where they should have felt safe," Jonathan Veitch, UNICEF representative in South Sudan said in a statement Friday. "The trauma for children under such circumstances is indescribable."

South Sudan saw massive violence sweep the country in December, when fighting broke out between troops loyal to President Salva Kiir, an ethnic Dinka, and those loyal to former vice-president Riek Machar, an ethnic Nuer who was fired last July by Kiir. Thousands of people are believed to have been killed, and more than 1 million have fled their homes.

Since December, Bor has changed hands four times between South Sudan's military and rebels loyal to Machar.

In Thursday's attack, UN spokesman Stephane Dujarric said "the assailants, a mob of armed civilians, came to the base under the guise of peaceful demonstrators intending to present a petition ... The armed mob forced entry on to the site and opened fire on the internally displaced persons sheltering inside the base."

The UN official on Friday said a surgical team from Doctors Without Borders flew into Bor to help treat those injured in Thursday's attack. The United Nations has also reinforced security at Bor, the official said.

The UN mission in South Sudan and UN Secretary-General Ban Ki-moon condemned the "unprovoked attack."

On Friday, the Security Council issued a press statement expressing "outrage" at the attack and reminding that "attacks on civilians and UN peacekeepers may constitute a war crime."

The UN mission called for a full investigation into the "heinous murders."

The secretary-general warned Wednesday that up to 1 million people face potential famine-level hunger because of the fighting.

UNICEF's Veitch said that during intense fighting in the oil hub of Bentiu in Unity State earlier this week, hundreds of children fled onto a UN base for protection. Others were observed carrying weapons, wearing uniforms and undergoing military training, he said.

Veitch said UNICEF has credible reports that both sides to the conflict are recruiting children. He cited the case of a 16-year-old boy who was gravely injured in the fighting and reported having been forcibly recruited three months ago by an armed group.