Niger says it will not be intimidated into leaving Mali, a day after nine of its peacekeepers were killed in an ambush in the neighbouring country.

Niger's president, Mahamadou Issoufou, vowed on Saturday that the West African country would stay in Mali and continue to fight.

Gunmen on motorbikes on Friday attacked a convoy of Niger's troops who are participating in a UN peacekeeping mission in Mali.

The ambush was the deadliest attack on the UN force yet.

UN troops are trying to stabilise Mali's north, which fell under the control of Tuareg fighters and then an al-Qaeda-linked group following a 2012 coup.

A French-led intervention last year scattered the fighters, but attacks on the UN force have been increasing lately.

Earlier, Ban Ki-moon, the UN secretary-general, said in a statement he was "outraged" by Friday's attack, which he described as "a serious violation of international law".

An officer from Niger with the MINUSMA mission told the AFP news agency the ambush had been staged by the Movement for Oneness and Jihad in West Africa (MUJAO), an al-Qaeda-linked group behind numerous attacks in the West African nation.

The deaths mark the first losses suffered by Niger's 600-strong force, deployed to Mali in January last year.