Central African troops seized back control of the western town of Bouar Saturday from hundreds of vigilantes who in recent months have been targeting Muslims, officials said, adding that four people had died in the violence.
The vigilantes "surrounded the town early this morning and shots from light and heavy firearms could be heard in several areas of Bouar", an officer told AFP on condition of anonymity.
The self-defence groups, who call themselves "anti-balaka" (anti-machete, in the local Sango language), were carrying machetes of their own as well as various other weapons, he said.
These groups were formed in response to killings, looting and abuse committed by those ex-rebels who did not integrate the army after a coup in March but went rogue, sowing terror across the country.
The clashes between the vigilantes and the former Seleka rebels which are now part of the Central African armed forces "killed four among the self-defence groups and left several people wounded in both camps", said the military official.
Fighting was heard in several areas of the largely deserted town throughout the morning, said the officer, who was unable to say whether it had caused any casualties.
By mid-afternoon, "the army had taken control of the city", Bouar's mayor Ali Aoudou Moumini, told AFP by telephone.
Moumini said the few people who had not fled before the attack remained holed up at home.
The head of the now disbanded rebel Seleka group, Michel Djotodia, was installed as the impoverished country's first president to hail from the Muslim minority in August.
Many ex-Seleka commanders wreaking havoc in the Central African Republic are Muslims and the creation of vigilantes to combat them has sparked fears of growing sectarian strife.
Awalou Mamadou, a local shopkeeper in Bouar, which is located some 400 kilometres (250 miles) northwest of the capital Bangui, estimated the number of attackers at between 300 and 500 men.
Maxime Lalai, a local civilian who spoke to AFP by telephone, said "the attackers have surrounded the town, we are trapped, we don't know which direction to flee to".
Ali Camara, who works for the international non-governmental organisation Cordaid, said he went to take refuge in a church, "but it is full there... I went back to my home where I stayed on the floor with my family".
Bouar has some 40,000 inhabitants and is located on the strategic axis connecting landlocked Central African Republic with Cameroon, where its main imports come through.
Former colonial power France has warned that the country risked becoming a Somali-style "failed state" and has pushed for greater international support.
On October 21, the Central African Republic's neighbours pleaded for more robust action from a regional peacekeeping force, which is ill-funded and has so far failed to make an impact.