The violence follows the kidnapping of six policemen last weekend, blamed on a rebel group based in the Muslim quarter of Bangui.
It was unclear if the fighting yesterday was connected to the kidnapping.
The gunfire erupted in the capital's predominantly Muslim PK5 neighbourhood and forced hundreds of residents from their homes, an AFP correspondent said.
Police said three people were killed in the gunfire.
Witnesses said soldiers from the United Nations Mission for CAR were also involved in the fighting, but it was not clear who else participated.
More From This Section
CAR, one of the world's poorest countries, was plunged into chaos by the March 2013 ousting of long-serving president Francois Bozize, a Christian, by the mainly Muslim Seleka rebel alliance.
The coup sparked revenge attacks involving Muslim forces and Christian vigilante groups known as "anti-balaka" (anti- machete) militias.
Thousands were slaughtered in the spiral of atrocities that displaced about a tenth of the population of 4.8 million.
Fears of a bloodbath led to a military intervention by former colonial power France and the deployment of UN peacekeepers.