In the shade of a tree close to the slow waters of the White Nile river, a body killed during the fighting over South Sudan’s town of Bor gathers flies.

On the bumpy road towards the heavily fortified compound of the United Nations peacekeepers, another body of man lies beside the track.

But some civilians are dancing, celebrating the liberation just hours before from rebel fighters who held the town for almost a week.

Hundreds of civilians weighed down with baggage, some balancing mattresses rolled up tight on their heads, flood back into the town, after rebels were forced from their positions by the army and fled.

Bor, state capital of South Sudan’s power-key eastern state of Jonglei, some 200 kilometres (125 miles) north of the capital Juba, was seized by forces loyal to former vice president Riek Machar a week ago.

Government troops entered Bor on Tuesday just before dark, with fighting to finally retake the town continuing throughout the night.

Occasional shots still rang out on Wednesday afternoon, as soldiers from the Sudan People’s Liberation Army (SPLA) said they were hunting down possible hold-out rebels to secure the town.

The chaos caused by the rebels is everywhere to see.

Shops are looted, houses smashed down, while in the office of the governor — used by the rebels as a base during their occupation — windows have been bashed in and doors ripped off their hinges.

Huge piles of papers are scattered on the floor and covered in boot marks.

“We captured Bor yesterday evening… but there was still shooting throughout the night until around dawn,” soldier Simon Deng told an AFP correspondent, visiting the town Wednesday afternoon on a government-sponsored trip.

Bor’s capture put an end to nearly a week-long seige of the town, that forced over 17,000 desperate civilians to seek shelter and protection at the overstretched United Nations peacekeeping compound, severely impacting limited food and supplies.

Peacekeepers had feared an assault like that which took place last week on a remote UN outpost in Jonglei’s Akobo, in which two Indian blue helmets were killed when some 2,000 gunmen stormed the base to massacre at least 20 civilians sheltering there.

Vowing not to let gunmen breach the compound in Bor, UN peacekeepers had spent days bolstering fortifications ahead of the army assault.

During rebel control, four United States servicemen were wounded in an aborted mission to evacuate American citizens from the town when gunfire hit their three aircraft, with the mission finally completed a day later on Sunday.

Now, some civilians wave their hands in the air, the women ululating at the soldiers from the SPLA driving past, shouting the South Sudanese civil war-era chants of support, “SPLA-oyee!” (oh yes).

Fighting has gripped South Sudan for more than a week, after President Salva Kiir accused his former deputy Machar, who was fired from the government in July, of attempting a coup. Machar denied the claim and accused Kiir of carrying out a vicious purge of his rivals.

Bor’s recapture was described by Information Minister Michael Makwei as a “gift of the government of South Sudan to the people”.

But deep ethnic tensions remain, with Nuer civilians in Bor — from the same ethnic group as Machar and the rebels — now wary and fearful of possible reprisal attacks, despite government assurances only the rebels and criminals will face justice.

A handout photo released by the UNMISS shows a wounded man getting off an UN helicopter as a group of wounded people were transported from Bor to Juba on December 22, 2103