The attack took place in a dawn raid that illustrated continuing volatility two years after France helped take back territory seized by al Qaeda-linked militants.
(READ MORE: Mali’s political regime still improving)
A spokesman for the Malian army confirmed the attack in the town of Nampala, about 520 km (320 miles) northeast of the capital Bamako, but declined to give details about casualties.
Oumar Diakite, the mayor of neighbouring Diabaly district, said the attack started at 4 a.m. (0400 GMT).
"The Islamists were on motorbikes and some were on foot. They killed seven soldiers before they were chased out of the town around 11 by a reinforcement of the army," Diakite told Reuters by telephone.
(READ MORE: France’s Hollande warns of Islamist threat in West Africa)
In January 2013, France launched a U.N.-backed military intervention to drive al Qaeda-linked militants from towns in northern Mali they had seized in 2012. The militants have since mounted an insurgency targeting the Malian army and U.N. troops.