Boris Johnson unveiled the aid package during a visit to the north African country following talks with Prime Minister Fayez al Serraj.
Britain has also offered to increase its engagement with the country’s law enforcement authorities, including the coast guard, which already receives Royal Navy training on dealing with migrants who try to cross the Mediterranean in an attempt to get to Europe.
Libya will also be given £4m to support the removal of mines and improvised explosive devices (IEDs), particularly in the city of Sirte, a former stronghold of Islamic State.
The country has been riven by unrest since Muammar Gaddafi was ousted in 2011, and this is Mr Johnson’s second visit in less than six months.
Speaking in Tripoli, he 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, gunrunners 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.”
Mr Johnson discussed with the Libyan PM what more the UK can do to support his Government of National Accord and the peace and stabilisation process being led by the UN.
The support outlined by the Foreign Secretary includes:
:: £3m to remove IEDs in Sirte and £1m to fund demining training across Libya
:: £1m to help rebuild critical infrastructure and restore basic public services
:: £2.75m to support women’s participation in peacemaking and rebuilding Libya
:: £1.29m for food, essential hygiene items and urgent healthcare needs for displaced people.
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 crossing the Mediterranean.
He told 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.”
Fionna Smyth, Oxfam’s head of humanitarian campaigns, was critical of the Foreign Secretary’s rhetoric.
She said: “It is disturbing that Boris Johnson is talking about preventing people who are fleeing violence and destitution at home from leaving Libya.
“Research we conducted with people who fled through Libya found that all but one of the women questioned had suffered sexual exploitation, and three quarters of people had witnessed murder or torture.
“Aid for people travelling through Libya is welcome, but Britain should be helping them to find safety, not trapping them in a country where they face violence and abuse.”
Before going to Libya, the Foreign Secretary headed to Tunisia to hold talks with UN special representative Ghassan Salame, whose recent appointment has been hailed by Britain as a possible means of breaking the political deadlock in Libya.
Mr Johnson also met Tunisia’s tourism minister to discuss ways to strengthen economic and security ties, following the Foreign Office lifting advice against travel to the country.
The restrictions were enforced in the wake of the 2015 terror attack in Sousse that left 38 people dead, the majority of them Britons.