The UN mission in the Central African Republic said Wednesday it had taken back control of Bambari after several institutions in the central city were attacked, leaving eight dead.
"After attacks, Minusca quickly re-established control of the city," the UN spokesperson Vladimir Monteiro said in a statement.
Gunmen "allegedly affiliated" with the armed group Union for Peace in CAR (UPC), on Monday night and Tuesday morning raided the Bambari gendarmerie, the police station, as well as the city's Minusca base, the statement said.
Eight people were killed during the fighting, Monteiro said.
NGO bases and the Catholic parish of Saint-Jean were also attacked, while a UN pick-up vehicle was stolen by armed men who paraded around town with it, Bambari's civil society co-ordinator said.
On Tuesday, Medecins Sans Frontieres (MSF) said it had treated six wounded people.
Bambari - which straddles several areas under the influence of armed groups - had enjoyed a relative calm since the intervention of Minusca in early 2017 to dislodge the UPC.
The UN made Bambari the showcase for its intervention in CAR, arguing that the city was "without arms or armed group" and inter-community initiatives have emerged in recent months.
Bringing back memories of the 2013 violence that left thousands dead, CAR is again suffering from inter-community tensions. Violence in its capital Bangui in April left dozens dead.
The state controls only a small part of CAR's national territory. Armed groups clash in the provinces for control of resources, including diamonds, gold and livestock.