Britain is providing more than £9 million to help stabilise Libya and tackle the threat of terrorism and people-trafficking, Foreign Secretary Boris Johnson has announced during a visit to the north African country.
Mr Johnson's visit came as the head of Libya's unity government issued a warning that Europe faces a growing risk from terrorists unless it does more to help his country stem the massive tide of illegal migrants.
The package of aid announced by Mr Johnson following talks with Prime Minister Fayyez Al-Serraj came with an offer of increased UK engagement with Libyan law enforcement authorities, including the coastguard, which is already receiving Royal Navy training on dealing with migrants who attempt to cross the Mediterranean into Europe.
Britain will also provide £4 million to support the removal of mines and improvised explosive devices (IEDs), particularly in the city of Sirte, a former Isis stronghold from which the Islamist militants were removed by Libya's military earlier this year.
On his second visit in less than six months to the country, which has been riven by unrest and division since the 2011 ousting of Muammar Gaddafi, Mr Johnson discussed what more the UK could do to support Mr Al-Serraj's Government of National Accord and the UN-led peace and stabilisation process.
Speaking from capital Tripoli, the Foreign Secretary said: "Libya is the front line for many challenges which left unchecked can pose problems for us in the UK - particularly illegal migration and the threat from terrorism.
"That's why it is so important that we work with the Libyan government and our partners to help bring stability to Libya, stopping it from becoming a fertile ground for terrorists, gun-runners and people traffickers in close proximity to Europe.
"This means supporting the new UN Representative and the political process, but it also means practical efforts too, including the new kit we are providing to make Sirte safer for Libyans and the work we are doing to ensure that the Libyan coastguard can secure their own borders, reducing the number of illegal migrants heading for Europe."
Ahead of Mr Johnson's visit, Mr Al-Serraj warned that would-be terrorists could be entering Europe among the tens of thousands of migrants making the perilous Mediterranean crossing, telling The Times: "When migrants reach Europe, they will move freely. If, God forbid, there are terrorist elements among the migrants, a result of any incident will affect all of the EU."
Among the additional support outlined by Mr Johnson was:
:: £3 million to remove IEDs in Sirte and £1 million to fund demining training across Libya.
:: £1 million to help rebuild critical infrastructure and restore basic public services.
:: £2.75 million to support women's participation in peacemaking and rebuilding Libya.
:: £1.29 million for food, essential hygiene items and urgent healthcare needs for displaced people.
Mr Johnson met members of the Libyan Naval Coastguard to hear about their UK training in search and rescue, boarding and inspecting vessels, human rights and the treatment of migrants.
His visit followed talks in Tunisia on Tuesday with UN Special Representative Ghassan Salame, whose recent appointment was hailed by the UK as an opportunity to break the political deadlock in Libya.
Mr Johnson also met Tunisia's tourism minister to discuss moves to strengthen security and economic ties, following the Foreign Office's decision to lift advice against travel to the country introduced after the 2015 terror attack on tourists in the beach resort of Sousse.
The Foreign Secretary also visited the Bardo Museum in Tunis, to pay his respects those who died in a terrorist attack in 2015.
Mr Johnson said: "Tunisian security improvements, supported in part through UK assistance, meant we could change our travel advice last month. The UK is a steadfast partner for Tunisia in building its prosperity and security and combating terrorism, and I look forward to even stronger ties between us."