Soon after the brutal Muammar Gaddafi met his savage and ignominious end, David Cameron spoke of his pride at the UK’s role in the dictator’s overthrow. But was he as proud of the almost €120m-worth of weapons that Britain had sold to the dictator since 2005, which helped to keep his despotic regime in power?

The uprising against Gaddafi was initially repelled by a range of heavy weapons, including the use of cluster bombs in civilian areas. These were drawn from the dictator’s massive stockpiles of arms, many of which now sit in poorly maintained bunkers and buildings. The Nato bombings, which helped the rebels sweep through the country, were aimed at destroying the weaponry that, at least in part, many of the Nato countries had supplied. Such blowback – the unintended consequences of arms sales – is common to the global trade in weapons, which is driven by a combination of geopolitics, greed, a profound lack of morality, and a marked absence of meaningful regulation and oversight.

Arms deals – undertaken by governments, their intelligence agencies, large and small manufacturers, middlemen, dealers and financiers – stretch across a continuum of legality and ethics from the official, or formal trade, to the grey and black markets, which I call the shadow world. In practice, the boundaries between the three markets are fuzzy, with significant intertwining. They are, to a large degree, dependent on each other. With bribery and corruption de rigueur there are very few arms transactions that are entirely above board. One study estimates that the trade accounts for almost 40% of all corruption in world trade.