The attack came a day after President Faustin-Archange Touadera announced a date for African Union-brokered peace talks with armed groups who control most of the CAR.
Members of the UPC militia and their allies carried out "various attacks" in the town early Thursday, an official statement said.
"Two policemen were killed and another was wounded," Communications Minister Ange-Maxime Kazagui told AFP.
Local papers said 10 people had been killed. It was not possible to confirm this toll.
Doctors Without Borders (MSF) said it had treated 30 people for bullet wounds.
MINUSCA, the UN force in the country, sent peacekeepers to the site of the clashes, spokesman Vladimir Monteiro told AFP. Its troops there had come under fire a day earlier, he added.
According to an internal UN report seen by AFP, a combattant called "General Bello," in charge of UPC fighters in Bambari, had been wounded.
Touadera had been scheduled to visit Bambari, located in the centre of the country, on Thursday and Friday to attend ceremonies for World Food Day.
The ceremonies, initially set for last October 16, had already been postponed twice because of unrest and were suspended once more after the latest clashes.
"The seriousness of these attacks is all the more unacceptable" given that on Wednesday the authorities agreed to open talks with the rebels, the government statement said.
Touadera on Wednesday had announced long-awaited AU-backed talks with rebels for January 24 in the Sudanese capital Khartoum.
The AU initiative, launched in 2017, has been heavily criticised for its slow pace but nevertheless has the backing of the United Nations.
Further east, the town of Bakouma remains in the hands of another rebel group allied to the UPC, the Popular Front for the Rebirth of CAR (FPRC). The FPRC seized control of the town in late December.
Both groups are offshoots of the Seleka rebel alliance that overthrew the regime of Francois Bozize in March 2013, holding power until 2014.
Touadera's government controls only a slim part of the country, and rival rebel forces regularly clash over diamonds, gold and livestock.