The attacks followed government accusations that ex-president Francois Bozize was plotting a coup.
The Central African Republic’s fourth-largest town, which was seized by rebel fighters on Tuesday ahead of next week’s elections, is now in the hands of United Nations peacekeepers and national security forces.
“The situation in Bambari is under control,” Abdoulaziz Fall, spokesman for the UN peacekeeping mission MINUSCA, told a press conference in the capital, Bangui, on Wednesday.
“The civilians are starting to return. The armed groups have been pushed back into the bush.”
The attacks followed government accusations that former president Francois Bozize was plotting a coup with armed groups ahead of presidential and legislative elections that will take place this Sunday.
At the CAR’s request, Russia and Rwanda sent “hundreds” of military personnel to support the troubled country, the government said, an account confirmed by those countries.
Bambari is located 380 kilometres (240 miles) northeast of Bangui.
Members of an armed group called Unity for Peace in Central Africa (UPC) overran the town on Tuesday after a two-hour battle with MINUSCA, according to sources.
On Tuesday, the town’s mayor said civilians were not attacked but the police station, gendarmerie and some houses were ransacked.
The CAR is one of the poorest and most unstable countries in the world, experiencing only rare moments of peace since it became independent from France in 1960.
Bozize came to power in a coup in 2003 before he, himself, was overthrown in 2013, in a conflict that largely mirrored the CAR’s sectarian divisions.
The 74-year-old former general slipped back into the country in December 2019 after years in exile, sparking fears of a comeback.
Bozize retains a large following, especially among the Gbaya ethnic group, the country’s largest, and has many supporters in the army.
He denies the allegations of an attempted coup.
He has been barred from contesting the elections by the country’s top court as he is the target of a 2014 arrest warrant for alleged murder and torture and is under UN sanctions.
His absence has left the incumbent, Faustin-Archange Touadera, 63, as the clear frontrunner in the 17-strong field of presidential candidates.
But Touadera’s government remains weak and the armed forces are poorly equipped and trained and remain heavily dependent on MINUSCA.
Despite a peace deal between the government and armed groups in February 2019, the country remains racked by violence.
Thousands of people have died in the last seven years, and nearly a quarter of the population of 4.7 million have fled their homes.