NAIROBI, Kenya — Hundreds of civilians were killed when South Sudanese rebels took control of a strategic oil-producing town last week, the United Nations confirmed on Monday.

The United Nations Mission in South Sudan issued a statement that said rebel forces entered the town of Bentiu in Unity State and separated groups of residents — who had sought refuge in churches, mosques and hospitals — by their ethnicity and nationality.

Members of the ethnic Nuer group who did not support the rebels, along with South Sudanese people from other ethnic groups and Darfuris from Sudan, were targeted and killed, the statement said.

The United Nations “strongly condemns the targeted killings of civilians based on their ethnic origins and nationality in Bentiu,” the statement went on to say.