The anti-balaka mostly Christian militia launched the dawn attack on the temporary UN base in Tagbara, near the southern city of Bambari, sparking several hours of gunfire.
“Peacekeepers fired back and after several hours of exchange of fire, one peacekeeper was killed and 11 others were injured,” said UN spokesman Stephane Dujarric. The soldier was from Mauritania.
The UN mission MINUSCA said 22 anti-balaka fighters were killed and warned that the attack could be considered a war crime.
UN peacekeepers later discovered the bodies of 21 civilians, including four women and four children in Tagbara.
MINUSCA said the bodies were found near a church, and that the deaths resulted from a separate incident using “traditional weapons,” indicating the use of machetes or knives.
Reinforcements have been sent to Tagbara, which lies 37 miles (60 kilometers) northeast of Bambari.
On Monday, UN peacekeepers were able to win the release of 23 people, including 13 women and three children held by the an ex-Seleka rebel group known as the UPC in Tagbara.
The ex-detainees were allowed to shelter in safety overnight at the base in Tagbara, which was attacked at 5:00 am, MINUSCA said.
The UN mission said an investigation will be carried out to “ensure there is no room for impunity” for the crimes.
Over the weekend, UN peacekeepers carried out a joint operation with CAR forces to rescue 15 people who had been taken hostage in the village of Koumbou by the Lord’s Resistance Army.
The CAR has been struggling to return to stability since the country exploded into bloodshed after the 2013 overthrow of longtime leader Francois Bozize by the mainly Muslim Seleka rebel alliance.
France intervened militarily to push out the Seleka alliance, but the country — one of the poorest in the world — remains plagued by violence between ex-rebels and vigilante militias.
The United Nations is growing increasingly concerned by attacks on peacekeepers that killed 59 peacekeepers last year, a sharp increase from the previous year.
Last year, 15 MINUSCA peacekeepers were killed in attacks.