More than 40 militiamen and two soldiers died when rebel militias raided the capital of south Sudan's oil-producing Upper Nile state and took more than 100 children hostage in an orphanage, the southern army said.
Renegade fighters attacked Malakal on Saturday in the latest violence to stoke fears for the stability of the south ahead of its independence from the north, due to take place on July 9.
Just short of 99 percent of southern voters chose to declare independence in a January referendum promised in a 2005 peace deal that ended decades of civil war with the north.
Some of the attackers took shelter in an orphanage and briefly held around 130 children inside hostage, U.N. officials, aid workers and the spokesman for the southern army (SPLA) Philip Aguer said.
"The attackers were trying to hide there. The orphans and staff were later released unharmed," said Aguer, without going into further detail. Aid workers said a priest led negotiations to free the children.
Aguer said the southern army clashed with the militia and eventually forced them out of the town.
More than 40 militiamen and two southern soldiers were killed, he said, and he had no information on civilian deaths.
The figures were almost double estimates of the death toll released on the day of the fighting.
Aid workers in the town, speaking on condition of anonymity, told Reuters they saw the bodies of at least three civilians killed in the fighting on Saturday.
They reported hearing heavy gunfire and shelling from the early hours of the morning until the evening.
Renegade militia leader George Athor claimed responsibility for the attack, saying one of his deputies had set out to seize weapons and rebuff an army offensive against his men.
Athor, a former senior SPLA officer, launched his revolt last year saying he had been cheated out of the governorship of the south's Jonglei state in April elections.
Southern politicians on Sunday walked out of talks about preparations for independence with the north, accusing Sudan president Omar Hassan al-Bashir of arming Athor and other militias to overthrow the south's government before the split.
The north's dominant National Congress Party (NCP) dismissed the accusations as "ridiculous".
Sudan's civil war, between the mostly Muslim north and the south, where most follow Christian and traditional beliefs, was fought over oil, ethnicity and ideology and killed an estimated two million people.