At least four United Nations peacekeepers and a Malian soldier have been killed in two separate attacks in northern Mali, according to officials.

Friday's attacks, which also left 21 other soldiers injured, took place while troops from the UN mission in the country, known as MINUSMA, were carrying out a joint operation with Malian forces near the border with Niger.

The first attack happened early on Friday morning in Indelimane, leaving three peacekeepers from Niger and a Malian soldier dead. The second happened near Douentza and left one peacekeeper dead, UN officials said.

There was no immediate claim of responsibility for the attacks.

In a statement, the UN Secretary General Antonio Guterres condemned the "outrageous" incidents against MINUSMA, warning that targeting peacekeepers may constitute war crimes.

"The Secretary-General conveys his deepest condolences to the Governments of Burkina Faso, Mali and Niger and his profound sympathies to the families of the victims. He wishes a swift recovery to the injured," his spokesperson said.

The mission, which has more than 11,000 troops and was established in 2013, is one of the most dangerous peacekeeping operations in the worl,d with troops and convoys regularly coming under attack from armed groups.

According to UN figures, more than 146 members of the mission have lost their lives since 2013.

Last month, three UN peacekeepers from Chad were killed when their vehicle hit a landmine and fourth peacekeepers died later from their wounds..

The security situation in Mali has been fragile since 2012 after armed groups captured the entire northern part of the country and were only pushed back a year later following a military intervention by France.