Eyewitnesses living nearby said that the attackers arrived on motorbikes and cars.
The peacekeepers "responded robustly" and killed a number of the assailants, according to the UN.
"Attacks targeting United Nations peacekeepers may constitute war crimes under international law," the organisation said in a statement.
"The secretary-general calls on the Malian authorities...to spare no effort in identifying the perpetrators of this attack so that they can be brought to justice as swiftly as possible."
The UN's mission in Mali was established in 2013 and is one of the organisation's deadliest peacekeeping efforts.
A number of jihadist groups, linked to al-Qaeda and Isis, have grown increasingly powerful in Mali and are now targeting the more populated south of the country instead of the West African nation's arid north.
Peacekeepers from Chad have borne the brunt of the violence, with 51 killed by the end of 2018.
The UN's 15,000 strong mission aims to combat the militants, alongside Malian and French troops and a five-nation regional counterterror force.
Additional reporting by agencies
Join our commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies