The United Nations says the town of Bambari in the Central African Republic (CAR) has been retaken from rebels who seized it on Tuesday.
A spokesperson said UN peacekeepers and national security forces were in control, having pushed the militants back into the bush.
He said civilians who had fled the fighting were starting to return.
The CAR is due to hold elections on Sunday.
The government has accused the former president, François Bozizé, of joining up with armed groups in an attempt to stage a coup – something he has denied.
Russia and Rwanda have sent hundreds of additional troops to bolster the government, as the rebels try to advance towards the capital Bangui.