Algeria announced this month that it had opened a new air base in the country’s far south to help secure its borders with Mali, Niger and Libya.

And Chad closed its borders with Libya in January, fearing potential terrorist infiltration. The country reopened one main border crossing this month under pressure from border towns suffering a dearth of commercial traffic and to allow Chadian citizens to return home from Libya.

“As long as the Libyan chaos lasts, security in the Sahel and the Sahara will always be strained,” President Idriss Déby of Chad told a regional security conference in Bamako, Mali, this month. The Sahel is a vast area on the southern flank of the Sahara that stretches from Senegal east to Chad.

American intelligence agencies offered wide-ranging estimates last year on the peak number of Islamic State fighters in Libya — mainly in Surt, but also in Benghazi and Tripoli — with some assessments topping 5,000 militants.

Perhaps several hundred of those fighters have survived and fled in various directions within the country, or even to Europe, military officials and intelligence analysts say.

“The multiple militias and fractured relationship between factions in east and west Libya exacerbate the security situation, spilling into Tunisia and Egypt and the broader Maghreb, allowing the movement of foreign fighters, enabling the flow of migrants out of Libya to Europe and elsewhere,” General Waldhauser said.

Even before President Trump took office, vowing to intensify the global fight against ISIS, the Pentagon was accelerating its counterrorism efforts here in Central Africa.