Following multiple incursions including deadly attacks in the northern regions of Benin, Ivory Coast and Togo, governments in the Gulf of Guinea are reviewing their strategy.
Their chief concerns, analysts say, is how to avoid replicating the mistakes of their neighbors in the Sahel, and how best to muster foreign support.
Last month, Benin President Patrice Talon told his French counterpart Emmanuel Macron that his country needed more equipment, especially drones.
Macron has said that France, despite its exit from Mali, is committed to the "fight against terrorism" in West Africa.
He said he is ready to participate in meetings of the "Accra Initiative" -- a body set up in 2017 to boost security cooperation between countries in the region.
Among coastal states, northern Benin has been the most affected by the expanding jihadist threat, with around 20 attacks against security forces since late 2021.
"What we are going through is terrifying," a Beninese officer deployed at the border with Burkina Faso told AFP, speaking under condition of anonymity.
"We wake up every morning without knowing if we will survive the day," he added.
Countries in the region have beefed up security in vulnerable areas, including Ghana, which so far has been spared attacks.
But whether this will work is the big question.
Shoring up border security will be "ineffective, (just) as it was in the Sahel," the Moroccan Policy Center for the New South think tank warned this month.
Jihadist groups in the Sahel "are not traditional armies," it said. "They spread ideas and exploit the grievances of target populations."
"The deteriorating security situation in Burkina Faso and Mali has made the north of the coastal countries the new front line against armed groups operating in the Sahel," the Konrad Adenauer Foundation, a German think tank, said in a report in April.
Jeannine Ella Abatan at the pan-African Institute for Security Studies in Senegal described the rash of recent attacks as "the tip of the iceberg."
"Since 2019, studies on the Sahel show that extremist groups were already connected to coastal states, either for logistical or operational support, but also for financing," she told AFP.
"The state must urgently respond to the needs of these people -- make them feel protected by the presence of security forces instead of letting them seek protection from these groups," Abatan said.
Militants do not occupy territory in the coastal countries but instead infiltrate northern regions where they conduct sophisticated attacks, Abatan said.
Togo first experienced a jihadist attack in May 2021. Benin's first known fatal attack was last December, when two soldiers were killed near the border with Burkina Faso. In Ivory Coast, four members of the security forces died in 2021, after 14 in 2020.
Such attacks, said Abatan, are only possible thanks to good intelligence-gathering capabilities and the "complicity" of locals.
Increased recruitment among border populations is a major threat, she said.
Last week, a widely-shared propaganda video featuring two jihadists speaking Bariba, the local language in northern Benin, called on people to join them and threatening those who collaborate with the state.
Coastal countries seem to have accepted the argument that poverty and other sources of resentment create a potential pool for recruitment.
In Benin, the government has launched development projects, building schools and hospitals in some underdeveloped areas, and millions of dollars have been invested in Ivory Coast.
But much more needs to be done, says a Moroccan think tank, which also gives a specific warning against militarization of the border areas.
"Without an immediate and dramatic change of approach," it warned, residents in these border areas will "collaborate with extremists to keep themselves alive as best they can."