An attack on a military patrol in northern Mali on Sunday killed four civilians and wounded 31 others, including four French soldiers, Mali’s government and the French army said.

The ambush, which involved a car bomb explosion followed by gunfire, took place two days after extremist militants killed at least six people during a raid on a military headquarters in central Mali, a country where French troops are helping combat militants across its vast desert reaches.

France's army spokesman, Patrik Steiger, confirmed that civilians had been killed in an attack in Gao and the army was assessing the state of the 30-strong French patrol that came under attack.

He said the explosion happened near three French vehicles.

No one has claimed responsibility for the attack, which occurred a month before presidential elections scheduled for the end of July.

But violence by extremist militants has proliferated in the sparsely-populated Sahel in recent years, with groups linked to al-Qaeda and Daesh using central and northern Mali as a launchpad for attacks across the region.