Gunfire broke out in the base in Malakal in the northeast Upper Nile region on Wednesday night, with clashes continuing today.
The UN mission in South Sudan (UNMISS) said five people had been killed and some 30 wounded, according to initial reports, with peacekeepers firing tear gas to break up crowds in the crowded camp.
"Violence involving the use of small arms, machetes and other weapons broke out," UNMISS said in a statement.
Over 47,700 people live inside the Malakal base, among almost 200,000 civilians who have sought shelter behind the razor wire fences of eight UN bases across the country since civil war began in late 2013. No weapons are allowed on the bases.
More From This Section
Resident Jack Nhial, speaking from inside the UN base, said at least 12 people had been killed.
"They used Kalashnikovs and machine guns... The situation is still tense," Nhial said, adding the peacekeepers were now patrolling the base in tanks.
Community leader Deng Amum, told Juba's Eye Radio that at least five people had been killed and 38 wounded in the battles. Rebels also reported the shooting, but the numbers killed could not be independently confirmed.
In the past, the UN has said attacks on its bases in South Sudan may constitute a war crime.
Veteran opposition politician Lam Akol, who comes from Malakal in the northeastern Upper Nile state, condemned what he called the "callous and cowardly attack on innocent unarmed civilians."
The UN mission has more than 12,000 peacekeepers with half of them deployed solely to protect the civilians in their bases.