At least five people have been killed during an attack by armed men on a northern town in the Central African Republic, a source in the African peacekeeping force has said.

Heavily armed men believed to be ex-Seleka rebel fighters stormed Nana Bakassa, 300km north of the capital Bangui on Tuesday, an officer with the MISCA force told the AFP news agency.

"We provisionally counted five dead and others wounded" in the attack, where people were targeted on the streets and in their homes, he added on condition of anonymity.

The men were identified by residents as members of the Seleka movement, an alliance of mostly Muslim groups which controls parts of the north, the officer said.

Nana Bakassa is located in the district of Ouham, home of former President Francois Bozize, who was overthrown by the Seleka rebels in March 2013, plunging the country into a cycle of chaos.

Violent clashes between the former rebel forces and the largely Christian "anti-balaka" vigilante forces, which were created in response to Seleka's atrocities, have killed dozens in the area in recent months.

The two groups were the main players in sectarian violence that left thousands of people dead and hundreds of thousands displaced in the country over the past two years.

Tuesday's attack sent many inhabitants fleeing to other regions in the northwest of the country and into the bush, said the MISCA officer.

A ceasefire pact signed was signed between armed groups in July.

Source: Agencies