Germany is pouring money into the creation of electronic surveillance systems along Tunisia’s eastern border, designed to prevent extremists and migrants from slipping across into the country from neighbouring Libya, a government spokesperson said on Friday.

Tunisia stepped up security measures along the 300-mile frontier in 2015 following attacks by Islamic extremists believed to have received training in Libya.

But European governments have also been seeking ways to halt the flow of migrants across the Mediterranean from Africa in recent years, including by funding border security measures in key countries.

A spokesperson for Germany’s defense ministry, Michael Henjes, said that Berlin has earmarked $21.3m in financial support to install permanent radar systems along the Tunisian border.

The project is being managed by the US government’s Defense Threat Reduction Agency.