DAKAR/BAMAKO (Reuters) - Five soldiers from Niger and three U.S. Army Special Forces troops were killed and two wounded in an ambush on a joint patrol in southwest Niger on Wednesday, according to Nigerien and U.S. officials.

The five Green Berets were attacked while on a routine patrol in an area known to have a presence of insurgents, including from al Qaeda in Islamic Maghreb (AQIM) and Islamic State, a U.S. official told Reuters.

It was unclear who fired on the U.S. and U.S.-backed forces, the official said. Those forces were not patrolling the area with any specific objective, such as a high-value target or rescuing a hostage, the official added.

A spokesman for U.S. Africa Command confirmed the attack after Radio France International (RFI) reported a lethal ambush near the Niger/Mali border.

“We can confirm reports that a joint U.S. and Nigerien patrol came under hostile fire in southwest Niger,” said the spokesman.

Namatta Abubacar, an official for the region of Tillaberi in Niger, said five Nigerien soldiers were among the dead.

A Niger diplomatic source said the attackers had come from Mali and had killed several soldiers, without saying whether any of the U.S. troops stationed in the West African country were among the victims.

U.S. President Donald Trump was briefed by telephone on the attack by White House Chief of Staff John Kelly while Trump flew back on Air Force One from Las Vegas, where he had been visiting victims and first responders affected by Sunday’s mass shooting.

RFI said earlier on Wednesday a counter-attack was underway.

African security forces backed by Western troops are stepping up efforts to counter jihadist groups forming part of a growing regional insurgency in the poor, sparsely populated deserts of the Sahel.

A relatively new militant group called Islamic State in the Greater Sahara has claimed some of the attacks.

Geoff D. Porter, head of North Africa Risk Consulting, said that any confirmation of Islamic State’s role in Wednesday’s strike would lead to a strategic shift from Libya toward the Sahel band, stretching eastwards from Senegal to Chad.

“The emphasis ... will now shift south,” he said.

The U.S. Africa Command has hundreds of soldiers deployed across the region, including at an air facility in Agadez, and offers training and support to Niger’s army in aspects such as intelligence gathering and surveillance.