Mali's prime minister resigned along with his entire government on Thursday following criticism over their handling of an upsurge of violence in the centre of the country and a massacre last month that left 160 people dead.

A statement from President Ibrahim Boubacar Keita's office said he had accepted Soumeylou Boubeye Maiga's resignation and that of his government two weeks after mass protests erupted over the rising tide of violence.

Lawmakers from both ruling and opposition parties had submitted a motion of no confidence against the government on Wednesday, blaming Maiga and his administration for failing to clamp down on the unrest.

"A prime minister will be named very soon and a new government will be put in place after consultations with all political forces" from both the ruling and opposition sides, the statement from Keita's office said.

The president had on Tuesday said in a televised address that he had "heard the anger", without explicitly naming the prime minister.