The fighting took place yesterday near Rugazi, 140 kilometres north of the capital Bujumbura and in a thickly forested area on the Rwandan border.
The attack has been claimed by rebel Burundian army soldiers who attempted but failed to overthrow President Pierre Nkurunziza in a coup in mid-May.
The central African nation has been gripped by months of unrest over Nkurunziza's plan to stand for a third consecutive five-year term, which opposition groups say is unconstitutional and a violation of a peace deal that ended a dozen years of civil war in 2006.
"The local population alerted a military post and there were two battles which left 12 of the attackers dead."
More From This Section
He added that the group was believed to be around 500-strong, and that the remaining fighters had "disappeared into the forest".
Speaking to France24 television late yesterday, Burundian rebel general Leonard Ngendakumana -- who took part in the failed coup in May to topple Nkurunziza -- said rebel soldiers were involved in the fighting.
"Our soldiers were attacked by the army and responded. They inflicted several losses on Nkurunziza's forces," he told the station.
General Ngendakumana, a former top intelligence officer, is an ally of coup leader General Godefroid Niyombare, who has been on the run since their attempt to seize power was thwarted.
Over 70 people have been killed in more than two months of anti-Nkurunziza protests, with over 158,000 refugees fleeing to neighbouring countries, according to the United Nations.
There are fears the current crisis could plunge the impoverished, landlocked country back into civil war.