Peacekeepers repelled the attack, carried out by several "heavily armed terrorists", a U.N. mission statement said, adding that a number of attackers were killed. Insurgents are active in northern Mali.
"A provisional toll shows four peacekeepers dead and wounded. Helicopters were dispatched to the scene to evacuate the wounded," the statement said.
The U.N. mission in Mali, known as MINUSMA, has deployed over 13,000 troops to contain violence by armed groups in the north and centre of the country. It has recorded about 230 fatalities since 2013, making it the deadliest of the U.N.'s more than dozen peacekeeping missions.
Al Qaeda and Daesh have stepped up activity in Africa's Sahel region in recent years, displacing thousands. There was no immediate claim of responsibility for Friday's attack.
In a separate attack on a military post in central Mali on Friday, two Malian soldiers were killed and 10 wounded, the army said in a statement.