(CNN) -- Heavily armed militants staged an attack on a U.N. peacekeepers' base that was sheltering civilians in South Sudan on Thursday, killing at least 48 people and seriously injuring dozens more, a U.N. spokesman in the country said Friday.
The attack on the U.N. base in Bor, the capital of Jonglei state, began when militants used rocket-propelled grenades to breach the compound, U.N. spokesman Joseph Contreras said.
Contreras said the gunmen then opened fire at the base, where peacekeepers had been hosting and protecting nearly 5,000 civilians.
Details about how the attack ended were not immediately available, but the death toll is expected to rise, Contreras said. A search of the site continued Friday, he said.
United Nations Secretary-General Ban Ki-moon strongly condemned the violence. Ban called the attack a "serious escalation." Any attack on U.N. peacekeepers is "unacceptable and constitutes a war crime," the Ban said in a statement released on Thursday. He also called on the government to take immediate steps to protect all U.N. bases in the country.
South Sudan erupted in violence in mid-December when rebels loyal to ousted Vice President Riek Machar tried to stage a coup to oust President Salva Kiir.
Since then, militia loyal to Machar have battled government forces. Violence has quickly spread, with reports of mass killings emerging nationwide.
South Sudan seceded from Sudan in 2011 after decades of war. But numerous armed groups have remained active in the oil-rich country.