BANGUI (Reuters) - The United Nations’ head of peacekeeping said on Thursday that civilians killed in gunbattles in Central African Republic’s capital this week had been armed by criminal gangs that U.N. troops are attempting to stamp out.

On Wednesday, hundreds of angry demonstrators laid the bodies of at least 16 people in front of the entrance to the U.N. mission in Bangui, known as MINUSCA. A local official said a total of 21 people were killed, including women and children.

The protesters accused U.N. troops of firing on civilians during operations in the PK5 neighborhood - a Muslim enclave in the majority Christian city.

Speaking to Reuters during a visit to Bangui, Jean-Pierre Lacroix acknowledged there had been civilian deaths during the joint operation with Central African security forces.

“There were, unfortunately civilians, civilians that were armed by the irresponsible criminal gang leaders ... who confronted the Central African armed forces and MINUSCA. That resulted in a large number of dead,” he said.

Lacroix said the United Nations deplored the loss of life.

“We are very angry, but not against these young people, who were manipulated. We’re very angry with those manipulating them, who arm them and use them for their selfish reasons,” he said.

Central African Republic descended into turmoil after mainly Muslim Seleka rebels ousted President Francois Bozize in 2013, provoking retaliation killings by “anti-balaka” militias, drawn largely from Christian communities.

Self-styled Muslim self-defense groups sprang up in PK5, claiming to protect the Muslim civilians concentrated there from ethnic cleansing.

But MINUSCA now accuses them of extortion and violence against civilians. U.N. peacekeepers and local security forces have battled the armed groups since Sunday in an operation aimed at dismantling their bases.

One Rwandan peacekeeper was killed and nearly 20 other U.N. soldiers have been wounded in the clashes, Lacroix said, but added that the mission would not back down.

“Today, the reality is that they are trying to artificially divide the Central African people, who lived together for a very long time in harmony no matter what religion,” he said. “They’re seeking division to maintain the chaos. And we have to say, no. We’re going to resist this attempt.”

Nearly 13,000 U.N. peacekeepers have sought to protect civilians and establish order in Central African Republic since the withdrawal of a French-led international intervention force in 2016 following elections.

However, the government has little influence outside the capital, ex-rebels and armed militias still stalk the countryside and there are regular flare-ups of deadly violence.