Targeted ethnic killings and killings of civilians by government soldiers spread panic throughout the western town of Wau on Monday, residents told The Associated Press.

A government spokesman could not confirm the violence but the U.N. mission confirmed killings in Wau. U.N. officials have repeatedly warned that South Sudan is at risk of genocide.

Soldiers from South Sudan's army on Monday morning singled out civilians of the Fertit and Luo ethnic groups in retaliation for a rebel attack on government forces, residents said.

"They killed children, students going to school. When they find anyone in the road they kill them," said one resident of Wau, who insisted on anonymity for fear of reprisal. The government forces coordinated with cattle keepers of the Dinka tribe to go house to house in search of civilians of the other ethnic groups, attacking them with guns and machetes, he said.

Another resident said he knew of two separate families who had been killed in their homes. He said homes in the south of Wau town had been burned and civilians were fleeing to the local U.N. displacement site and church.

"Most of those doing it are guys in military uniform, this is clear. You can see they are carrying the flag of South Sudan," the second resident said, also on condition of anonymity.

The United Nations mission in South Sudan said in a statement Monday that its workers saw "the bodies of 16 civilians in a hospital. There were ten people who had been injured."

The fighting came to Wau town after government soldiers were killed in an ambush on Sunday south of Wau, said the U.N. statement. Army troops, tanks, and equipment were seen moving in Wau town late last week.

At least 3,000 people have fled to the nearby Catholic church and 84 others went to the U.N. displacement site, the statement said.

Government spokesman, Michael Makuei, could not confirm the fighting in Wau on Monday but said that rebel troops had ambushed a government convoy this past weekend, killing two officers with the rank of brigadier and major.

Diplomats expressed concern over the reports of ethnic killings in Wau.

"Very concerned by reports of house-to-house ethnic violence in #Wau, #SouthSudan. I call on all actors to cease fire and protect civilians," Alan Hamson, Canada's Ambassador to South Sudan said on Twitter.

The fighting is a continuation of South Sudan's civil war, which has grown more intense in recent weeks. At least 50,000 people have died since the civil war began in December 2013, and the country is now Africa's largest migrant crisis with 1.8 million refugees.

In March, a U.N. inquiry into South Sudan's civil rights conditions said that the country is experiencing ethnic cleansing and the conditions for genocide are present.