At least 16 civilians were killed on Monday in the South Sudanese city of Wau, according to the United Nations' peacekeeping mission in the country (UNMISS), with witnesses reporting that government-aligned militia were targeting residents based on their ethnic group.
The violence stemmed from an ambush on Sunday of government troops near Wau, leading to clashes in the city the following day, UNMISS said in a statement.
"The Mission mounted two patrols into Wau on Monday and said it had observed the bodies of 16 civilians in a hospital," UNMISS said, adding that 10 people had been wounded.
A power struggle between President Salva Kiir and his former deputy Riek Machar escalated into a military conflict in December 2013, leading to tens of thousands being killed and about 3.5 million being displaced.
The conflict has pitted Kiir's Dinka ethnic group against Machar's Nuers. Other ethnic groups have also created militias which have often formed alliances with either side.
Wau is located in a region that has repeatedly changed hands between government troops and rebels loyal to Machar.
UNMISS said troops, tanks and equipment from the SPLA national army had moved towards areas controlled by the rebels in the southwestern part of Wau late last week.
At least 3,000 people, mostly women and children, sought shelter in a Catholic church, while another 84 had sought refuge at an UNMISS Protection of Civilians site.
Civilians who spoke to news agencies described targeted killings in the city some 650km from the capital, Juba.
"The (people) who came are reporting to us that there are SPLA soldiers in the residential areas," Moses Peter, a priest, told the AFP news agency, confirming that up to 3,000 people were sheltering in his church.
"They are shooting and are targeting certain groups of people and they are even looting houses."
Local resident Tibur Erynio, 41, said a tally of the dead from his neighbours stood at 18, most of them from minority ethnic groups the Jur and Balanda.
The civilians were "killed because they are suspected of supporting rebels", Erynio told AFP, adding that this was not true.
Five residents, all of whom asked not to be named, described members of the president's Dinka ethnic group searching for members of the local Luo and Fertit groups.
"We are still inside hiding," one man told the Reuters news agency by telephone, speaking from a Wau neighbourhood called Nazareth. "I have seen four dead bodies of my neighbours".
"Armed militias are moving from house to house," another resident told Reuters. "It is an ethnic crackdown."
The International Committee for the Red Cross said it was rushing surgical teams to the city to assist the wounded.
The military and rebels gave conflicting accounts of the violence.
William Gatjiath Deng, a spokesman for the rebels, told AFP the fighting stemmed from an ambush laid by the rebels outside Wau on Sunday. He said 35 soldiers from a government-aligned militia were killed in the ambush.
The surviving pro-government forces returned to Wau, where Deng said they killed 50 civilians in "house-to-house" raids.
Speaking to Al Jazeera, army spokesman Colonel Santo Domic Chol said the killings of civilians were carried out by members of ethnic groups "who have nothing to do with this war" as retaliation against other ethnic groups.
"What happened in regard to the citizens in the area is a result of the fighting between some ethnic groups within Wau town who thought that they wanted to take revenge of the loved ones they lost due to fighting in those areas and decided to target ethnic groups as a soft target," Chol said from Juba.
Chol accused the army of using locals as human shields and said the army decided to "flush out" rebels in the area after an SPLA convoy was ambushed, "sustaining some casualties".
Both accounts could not be independently verified.
At least 1.7 million people have fled the country because of the war, and 1.9 million are internally displaced.
The war has also created a man-made famine, exacerbating a dire humanitarian crisis.
Source: Al Jazeera and news agencies