"The suspected jihadists fired on the UN mission at Douentza from a hill," a local elected official told AFP.
Malian troops repulsed the attackers, who lost two of their own men in the raid, he added.
"The terrorists targeted the peacekeepers of MINUSMA," said another local official, using the acronym for the UN force in Mali.
A Malian military source, confirming the attack, said reinforcements had been sent to bolster security in the town, he added.
Last week, UN peacekeepers accused former rebel fighters and a rival pro-government militia in the north of the country of having used child soldiers in recent clashes.
More From This Section
In 2012, key cities in northern Mali fell under the control of jihadist groups linked to Al-Qaeda, who exploited an ethnic Tuareg-led rebel uprising.
Although the Islamists were largely ousted by a French- led military operation, attacks have continued on UN and French forces, civilians and the Malian army.
The armed groups accused of abuses by the UN operate in areas where Mali's army is absent or has a very limited presence. Allegations of collusion between the former rebels and jihadists continue to circulate.