Two police officers serving with the UN's MINUSMA mission in Mali have been killed and four others wounded, the force said on social media, the latest blow to the international operation.

"A United Nations police patrol was attacked on December 16 in Timbuktu (northern Mali). Two of our police officers, including a woman, lost their lives and four others were injured, one of them seriously," MINUSMA said in a tweet that "strongly condemned" the bloodshed.

MINUSMA head El-Ghassim Wane tweeted he was "deeply shocked" by the incident while a MINUSMA official in Timbuktu told AFP the group had sent in a rapid reaction force some 30 minutes after the attack.

Timbuktu regional governor Bakoun Kante told AFP that the assailants ran into an army patrol on fleeing the scene and one soldier and one attacker were killed in an ensuing exchange of fire.

Mr Kante added the situation was now under control.

Mali has been grappling with a jihadist insurgency since 2012. Thousands of people have been killed and hundreds of thousands have fled their homes

MINUSMA's future is in doubt as violence rages in the centre, north and east of Mali.

Mali underwent a military coup in August 2020, followed by a second takeover in May 2021.

Germany said Thursday its forces will stay in Mali within the MINUSMA deployment until 2024 only if the junta allows them to operate freely and elections are held.

Germany has about 1,100 troops in Mali, according to Berlin.

It is the seventh country to decide in recent months to stop or suspend its participation in the UN mission.

The German military has been in Mali since 2013, with a presence of up to 1,400 soldiers as part of the MINUSMA mission, mostly based near Gao in the north.

But it has faced increasing difficulties in recent months, repeatedly having to suspend reconnaissance patrols after the junta denied over-flight rights.