NOUAKCHOTT (Reuters) - The leader of Islamic State’s affiliate in West Africa has claimed responsibility for an attack that killed four U.S. special forces and four soldiers from Niger in October, Mauritania’s independent Nouakchott News Agency (ANI) reported on Saturday.

The troops were killed when their joint patrol was attacked near the village of Tongo Tongo, on the Mali-Niger border, on Oct. 4 by dozens of militants armed with machine guns and rocket-propelled grenades.

The incident drew attention to the little-known U.S. military presence in Niger -- it has 800 troops stationed there -- and became a major publicity headache for President Donald Trump’s administration.

Security officials had identified the perpetrators as Islamist militants loyal to Adnan Abu Waleed al-Sahrawi, the leader of Islamic State in the Greater Sahara operating along Mali’s border with Niger and Burkina Faso, but there had previously been no confirmation from al-Sahrawi himself.

“We claim the attack which targeted the American commandos in the village of Tongo Tongo,” Sahrawi, who makes public statements only very rarely, was quoted by ANI as saying.

Privately owned ANI sometimes enjoys privileged access to information on movements of Sahara-based Islamist fighters. Last year it broke news that Mali’s main jihadist groups had merged, and in 2013 it had exclusive reports about a militant attack on a gas plant in Algeria in which 38 hostages were killed.

In the statement Sahrawi also claimed a car bomb attack on French troops on Thursday near Mali’s city of Menaka, ANI reported. He said it had “killed many of them”, although the French military said in a statement that the attack had merely wounded three troops.

Lawlessness across the Sahara has enabled jihadist groups to thrive and launch increasingly deadly attacks on local and Western targets there and in the semi-arid Sahel south of it. They are seen as the biggest threat to the region’s stability.

(This version of the story corrects name Adnan Abu Waleed al-Sahrawi, paragraph 4)