Eight soldiers were killed and 13 wounded in an attack in northern Togo on Wednesday, the government said, marking potentially the first deadly raid on its territory by Islamist militants who have killed thousands in neighbouring countries.

Before dawn, a group of heavily armed gunmen ambushed an army post in the Kpendjal prefecture near the border with Burkina Faso, the government said in a statement.

No one has claimed responsibility for the attack. The government blamed "terrorists", without providing specifics.

Security analysts said the attack was likely carried out by a local al Qaeda affiliate that is based in Mali but in recent years has spread south into Burkina Faso.

Groups linked to Islamic State and al Qaeda have carried out hundreds of attacks across the Sahel region of West Africa in recent years, focusing mainly on the landlocked countries of Burkina Faso, Niger and Mali.

Togo has so far been spared the violence, which has forced millions to flee their homes, but security experts have warned about a spread in operations that could encompass coastal states like Togo.

In 2018, Togo's military launched an operation to stop Islamist groups ghosting in from the north. Security forces repelled an attack by gunmen on a outpost in the same area as Wednesday's attack in November, without sustaining casualties. It said at the time that the attackers had come over the border from Burkina Faso.

Togo's coastal neighbour, Benin, has seen a sharp rise in attacks near its northern border with Burkina Faso. Five soldiers were killed last month when an army convoy struck an improvised explosive device. read more

International partners led by France have spent billions of dollars and deployed thousands of troops to contain the attacks, which began in Mali in 2012 before spreading into Niger and Burkina Faso.

But the violence continues, especially in poor rural areas where jihadist groups blend in.

The insecurity has undermined democracy in countries where residents have become fed up with the violence and rallied for change. In Mali and Burkina Faso, military juntas have snatched power since 2020, promising to shore up security.