Niger's army chief has been fired after two major attacks left 160 soldiers dead and dozens of others wounded, the government announced.

Chief of staff General Ahmed Mohamed led the army for more than two years, a period marked by a steep rise in attacks by fighters linked to ISIL and al-Qaeda that culminated in a raid on a remote army base on Thursday that killed at least 89 soldiers. The government said at least 77 attackers were killed by Niger's army and its foreign allies, most notably France and the United States.

More:

That attack on the Chinagrodrar Advanced Military post came less than a month after another on a military garrison in Inates that killed 71 soldiers and raised questions about Niger's ability to contain the spread of armed groups across its western border from Mali and Burkina Faso.

On Monday, President Mahamadou Issoufou appointed Brigadier General Salifou Modi, a former Nigerien military attache to Germany, as Mohamed's successor, the government announced after a cabinet meeting.

Niger said it would launch a new military offensive against armed groups, but past campaigns have failed to curb violence despite the presence of French and US troops.

Attacks in Niger have risen fourfold over the past year, killing more than 400 people, according to the Armed Conflict Location & Event Data Project, a non-profit research organisation.

Military campaigns by armies in the Sahel, a semi-arid swath of land beneath the Sahara, have also been marred by human rights abuses, which analysts say have pushed some civilians into the arms of the rebel groups.

In addition to ISIL attacks, countries in the region, especially Mali and Burkina Faso, have struggled to cope with deadly ethnic clashes between rival farming and herding communities.

Niger is part of a five-nation task force known as the G5, set up in 2014 with Burkina Faso, Mali, Mauritania and Chad.

Thousands of civilians and soldiers have died in the violence across the vast region, which began when armed fighters revolted in northern Mali in 2012.

The conflict has since spread to the centre of Mali and to neighbouring Burkina Faso and Niger. Attacks continue, despite France deploying 4,500 troops in the region as part of Operation Barkhane to help local forces.

Meanwhile on Monday , France and the five West African states agreed to combine their military forces under one command structure to fight a growing battle in the Sahel region, with Paris committing an extra 220 troops.