West African military chiefs are set to meet Thursday in Ghana to coordinate a possible intervention aimed at reversing Niger's coup.

Alarmed by a cascade of takeovers in the region, the Economic Community of West African States (ECOWAS) has decided to create a "standby force to restore constitutional order" in Niger.

The meeting of the top brass on Thursday and Friday comes after fresh violence in the insurgent-hit country, with jihadists killing at least 17 soldiers in an ambush.

An army detachment was "the victim of a terrorist ambush near the town of Koutougou" in the Tillaberi region near Burkina Faso on Tuesday, Niger's defence ministry said.

Twenty more soldiers were wounded, six seriously, in the heaviest losses since the July 26 coup.

Jihadist insurgencies have gripped Africa's Sahel region for more than a decade, breaking out in northern Mali in 2012 before spreading to neighbouring Niger and Burkina Faso in 2015.

The "three borders" area between the countries is regularly the scene of attacks by rebels affiliated with the Islamic State group and Al-Qaeda.

The unrest across the region has killed thousands of troops, police officers and civilians, and forced millions to flee their homes.

Anger at the bloodshed has fuelled military coups in all three countries since 2020, with Niger the latest to fall when its elected president Mohamed Bazoum was ousted on July 26.

The generals who have detained Bazoum said "the deteriorating security situation" sparked the coup.

- Diplomatic efforts -

Analysts say an intervention to oust the coup's leaders would be militarily and politically risky, and the bloc has said it prefers a diplomatic outcome.

ECOWAS issued a statement Tuesday "strongly condemning" the latest attack, urging the military "to restore constitutional order in Niger to be able to focus (its) attention on security... weaker since the attempted coup d'etat".

Talks have taken place this week in Addis Ababa among ECOWAS and Niger representatives under the aegis of the African Union.

The United States said Wednesday that a new ambassador would soon head to Niger to help lead diplomacy aimed at reversing the coup.

Kathleen FitzGibbon, a career diplomat with extensive experience in Africa, will travel to Niamey despite the ordered departure of the embassy's non-emergency staff.

On Tuesday, Niger's military-appointed civilian prime minister, Ali Mahaman Lamine Zeine, made an unannounced visit to neighbouring Chad -- a key nation in the unstable Sahel but not a member of ECOWAS.

He met President Mahamat Idriss Deby Itno, offering what he described as a message of "good neighbourliness and good fraternity" from the head of Niger's regime.

"We are in a process of transition, we discussed the ins and outs and reiterated our availability to remain open and talk with all parties, but insist on our country's independence," Zeine said.

- UN food warning -

Bazoum's election in 2021 was a landmark in Niger's history, ushering in its first peaceful transfer of power since independence from France in 1960.

He survived two attempted coups before being toppled in the country's fifth military takeover.

ECOWAS has applied a raft of trade and financial sanctions while France, Germany and the United States have suspended their aid programmes.

The measures are being applied to one of the poorest countries in the world, which regularly ranks bottom of the UN's Human Development Index.

The United Nations warned Wednesday that the crisis could significantly worsen food insecurity in the impoverished country, urging humanitarian exemptions to sanctions and border closures to avert catastrophe.

Niger is also facing a jihadist insurgency in its southeast from militants crossing from Nigeria -- the cradle of a campaign initiated by Boko Haram in 2010.