* Residents flee to U.N. peacekeeping base
* Firefight between soldiers and ex-rebel commander
* South Sudan full of weapons after decades of war
By Hereward Holland
JUBA, Jan 28 (Reuters) - Two thousand people were forced to flee to a U.N. base after a battle between South Sudanese soldiers and the guards of a former rebel commander laid waste to a small town, the United Nations and witnesses said on Monday.
South Sudan won independence from Sudan in 2011 but the government has been struggling to assert control over an impoverished country the size of France that is full of weapons after decades of civil war with the north.
The latest fighting took place on Sunday in the small town of Pibor in the eastern state of Jonglei, between soldiers and bodyguards of former rebel commander James Kuberin, witnesses said.
Kuberin used to be a commander of a group led by David Yau Yau, one of several militias fighting the government of the new African republic, but he defected to the army in December.
Witnesses said Kuberin went to Pibor's market to get a haircut and was told by an army patrol not to walk around with armed guards.
Witness Peter Gazulu said one of the soldiers had a hand grenade. "Somebody tried to take it and they wrestled with it and it exploded. The guy died. Then the other men opened fire on the bodyguards and they escaped," he told Reuters by telephone.
"The army fired all over the place and burned half of Pibor town, particularly in the south. They were firing at civilians," he said. "In a house the father of my friend was burned alive. The body is still there." Several people had been injured, he said.
About two thousand people fled the town, mainly made up of thatched houses, to seek protection at a U.N. peacekeeping base, U.N. spokesman Kouider Zerrouk said.
Army spokesman Philip Aguer said one soldier had been killed in the battle, and that Kuberin had fled with his guards afterwards. He declined to say whether the army had fired on unarmed civilians.
Medical organisation Medecins Sans Frontieres, one of few charities operating in Jonglei, said it had treated four people for gunshot wounds.
South Sudan's civil war with Sudan ended with a 2005 peace deal which paved the way for secession. Rebel and inter-ethnic violence is hindering government plans to explore a vast oil concession block with the help of French firm Total.
In Jonglei, there has been a cycle of revenge killings between the Murle and Lou Nuer tribes, often provoked by cattle raids. More than 1,500 people have been killed in the clashes since South Sudan's independence, according to the United Nations.
Human rights groups accuse the army of serious abuses against civilians, including simulated drownings and rape, during a disarmament process aimed at ending the inter-ethnic violence.
A radio station with links to Yau Yau's group said the rebels were fighting the government because of the alleged abuses during the disarmament programme.
South Sudan accuses Sudan of supplying Yau Yau's rebels with weapons, an allegation denied by Khartoum. (Reporting by Hereward Holland; Editing by Ulf Laessing and Pravin Char)