A caravan of gunmen ambushed a military post in the West African nation of Niger, killing 71 soldiers in an attack bearing the hallmarks of Islamist groups operating in the region, the country’s defense ministry said Wednesday.

Nigerien President Mahamadou Issoufou cut short a trip abroad because of the “tragedy,” his office said in a tweet, calling attention to the continent’s rapid spread of extremists with ties to the Islamic State and al-Qaeda.

The leader of neighboring Burkina Faso, which is also struggling to fight off insurgent groups, condemned the violence on Twitter, as early reports detailed one of the deadliest massacres of the country’s security forces in years.

Assailants in cars and on motorbikes stormed the army base Tuesday night with explosives, RFI Afrique reported, leaving several wounded and others missing.

No group had claimed responsibility for the attack.

The bloodshed comes less than a week before West African leaders are to meet with French President Emmanuel Macron in southwestern France to discuss the French military’s future role in curbing the conflict.

The ambush in western Niger took place a few hours from the village of Tongo Tongo, where militants from the Islamic State in the Greater Sahara killed four U.S. and five Nigerien soldiers in a 2017 attack that drew global scrutiny.

Niger has worked with French forces and troops from bordering countries in recent years to contain the unrest that has left thousands dead and forced nearly a million people from their homes, by the United Nations’ latest count.

U.S. officials say the fight against extremism has moved to Africa and warn that terrorists are using largely ungoverned swaths of harsh terrain to recruit fighters and plan attacks.

Islamist militant violence in the Sahel region has doubled every year since 2015, according to the Africa Center for Strategic Studies, a Washington-based think tank that tracks the death toll.

Militants are known to steal equipment after striking military outposts, analysts say, fueling a cycle of assaults that have grown more sophisticated.

West African leaders have pledged to spend $1 billion over the next five years to address the problem. But governments in the Sahel — some of the poorest in the world — often lack resources to combat the scourge. Borders are porous.

The attack in Niger happened near the border with Mali, which is considered the epicenter of the conflict. Fighting erupted after the Libyan government collapsed in 2011.

Mercenaries once hired by Moammar Gaddafi headed back to northern Mali and forged a shaky alliance with al-Qaeda fighters, setting off unrest that festered and now threatens to destabilize a region nearly the size of the United States.

More than 100 soldiers have died in Mali since September, with fighters linked to the Islamic State and al-Qaeda asserting responsibility for the attacks.

Issa Ly Hamidou in Niamey, Niger, contributed to this report.