Why Boris Johnson feels he must fix Libya
In the naval port in Tripoli, one is reminded of the different roles Britain has played in Libya in recent years.
In one dock lies the wreck of a frigate sunk by the RAF in 2011. It rests on its side, a rusting symbol of David Cameron's decision to use military force against Colonel Gaddafi's regime.
In another dock is a handful of coastguard vessels whose crews were partially trained by British Marines to help tackle the trafficking of migrants.
As Boris Johnson visited the port during a landmark two-day trip to Libya, it was clear both the scale of the problem Libya faces and the lack of resources it has to deal with it.
The foreign secretary examined one of the inflatable vessels used by people traffickers and was clearly struck by how insubstantial and dangerous it was.
The coastguard boats looked clean and freshly painted. But the truth is that many are fibreglass hand-me-downs from the Italian navy.
And however well trained the crews, there are simply not enough of them to deal the scale of the problem.
The flow of migration from Libya across the Mediterranean is a systemic, demographic phenomenon that cannot be fixed with a few more boats.
As Mr Johnson says, the international support being given to Libya - such as coastguard training or humanitarian aid - is a sticking plaster on what he calls "the gaping wound" across Libyan society, namely its lack of a functioning, unifying government.
This was Mr Johnson's second visit to Libya this year. And the question, of course, is why is he here at all?
Libya is not really Britain's problem.
Italy, the former colonial power, has a natural interest.
Emmanuel Macron, the newly elected French president, has chosen Libya as an early foreign policy adventure and has scored highly by holding a big summit last month to bring together some of the rival parties.
The Egyptians and Emiratis carry much sway here, particularly in the east. And the Russians are engaged, hoping to show that their global diplomacy does not end in Syria.
So why has Boris Johnson chosen to spend two full days meeting all the key players in both east and west, the first senior western politician to go to places like Misrata and Benghazi?
Why was he the first foreign minister to visit Field Marshal Khalifa Haftar, the commander of the Libyan National Army, who controls much of the east at his headquarters in Benghazi, and endure the extraordinary rendition of the national anthem by the LNA band?
One answer is that Britain is one of the countries, along with France and the United States, that bears some responsibility for the current chaos.
The UK decision to intervene militarily in Libya and then fail to help fill the vacuum left by Gaddafi's fall led in part to the current divisions. Mr Johnson clearly feels that if you broke it, you have to help fix it.
He also argues that Britain has a national interest here. Libya, he says, is now the front line in Europe's struggle against illegal migration and terrorism.
The numbers of migrants heading across the Mediterranean from Libya may have dipped in recent days but they are still high, about 90,000 so far this year.
And there is no simple solution.
Even if the numbers leaving Libya were reduced, that just means even more young African men being cooped up in awful camps in awful conditions at greater risk of radicalisation.
The third, less prominent reason for Mr Johnson's presence here in Libya, is to provide his critics with an answer to what he means by the slogan "global Britain".
This was a message dreamt up to try to show that the UK was not retreating from the world by voting for Brexit.
But since then, diplomats have struggled to explain what it might mean in practice.
Well, here is an issue where the UK can be global. It is a self-contained problem that is potentially solvable (Libya has a small population, little Sunni-Shia divide and a lot of oil: this is not Syria).
The UK "holds the pen" on Libya at the United Nations, to use the jargon which means Britain coordinates the diplomacy on this issue.
And the UK also knows that if it can get the rest of the international community (yes, that means you France and Italy and Russia) to row in behind the new UN special representative on Libya, Ghassan Salame, then the UK's influence on the country will grow because of its position as a permanent member of the Security Council.
Mr Salame, a veteran Lebanese politician, is expected to show a little ankle on his plans at the UN general assembly in New York.
In Tripoli, Mr Johnson raised a flag at the former residence of the British ambassador here, a burned out shell of a building that was destroyed by a mob in 2011.
His aim was to signal that Britain is expanding its diplomatic presence on the ground in Libya, even if it hasn't quite yet re-established a full embassy.
But he knows that for all the talk of progress, this is an issue that he is likely to be dealing with for some years. And it will take more than a few more diplomats to solve it.