The Senegalese army says separatist rebels attacked its Diégoune barracks in the southern province of Casamance on Tuesday.
A large number of Casamance Democratic Forces Movement fighters carried out the attack at 6:45 in the morning, the army said.
Local people say casualties were compounded by a vehicle being forced off the road.
Eye-witnesses' assessments of the number of dead varied between 13 and 15.
It is the second such attack in a matter of days.
The army says it killed five rebels and wounded six others in exchanges of fire. It admitted two casualties, one fatal. A third solder is reported missing.
A local inhabitant told RFI that the casualty numbers were in fact much higher because an army vehicle speeding reinforcements to the scene was ambushed by the rebels as it entered Diégoune village.
The vehicle was forced off the road and crashed into a building, killing two schoolchildren. Seven more soldiers were also killed.
The army says these seven soldiers were killed in a "serious road accident".
This attack follows only a few days after one in Kabeumb.