Libya's thriving trade in smuggled Syrian and African migrants is earning militia groups such as Islamic State (Isis) over $320m per year and providing a much-needed financial lifeline for the radical terrorist group as it expands from its traditional hubs in Iraq and Syria.
Once branded the best-funded terrorist group in the world and banking up to £1m per day from oil sales, bank robberies, extortion, smuggling and punitive taxes on local citizens, IS has had its funding squeezed over the past six months.
This has come as it has lost control of oil fields and faced renewed crackdown on the smuggling of antiquities and historical artefacts, which it had been looting from Syrian and Iraqi historic sites and selling on the black market in Turkey.
But in Libya, it appears IS has joined a number of other militias – tribal, political and religious – in taxing human traffickers in order to cash in on a lucrative human trafficking economy.
Even as the group was driven out of is stronghold in Derna on 15 June by a rival al-Qaeda-linked group, analysts were warning the group was still strong in the Maghreb.
And although there have been high-profile cases of Eritrean and Ethiopian asylum seekers being murdered by IS fighters in Libya since the beginning of the refugee crisis in the summer, in a majority of cases the extremist group is benefiting from the surge of people heading north for safety in Italy and northern Europe.
"They are making money from human trafficking through Libya, [that is] the way they are funding their proliferation. They are not moving people themselves, but they are taxing the people who are," said Tom Keatinge, director at the Centre for Financial Crime and Security Studies at the Rusi think tank.
A report by the Global Initiative Against Transnational Organized Crime on 11 May said the value of migrant smuggling in Libya had risen from $8m to $20m in 2010 to $255m to $323m in 2014. That growth, it said, "dwarfs any existing trafficking and smuggling businesses in the region, and has particularly strengthened groups with a terrorist agenda, including the Islamic State".
But if IS has found new avenues for funding in North Africa, it is relying on traditional sources in Iraq and Syria. Neither the group's recent failure in Tikrit nor its conquering of Ramadi will have had a major impact on the IS economy because both were largely empty of civilians. Equally, neither city is strategically important or wealthy enough to provide new revenue sources.
In April, reports of an increasingly chaotic IS welfare system that appeared to be barely functioning in Mosul were taken as evidence that the group may be running out of cash, and even that its financial mismanagement could prove to be its ultimate downfall. That view now appears to be overly optimistic.
"While the decline in quality of life in Mosul was evident in 2014, there had recently been some improvements with limited public electricity and IS road cleaning services having an impact, for example," said Aymenn al-Tamimi, an analyst who has collated and translated vast amounts of information from inside Mosul since IS took control a year ago.
IS is hardly a booming economy but equally it is not in financial dire straits, al-Tamimi added, and as coalition air strikes have struck at IS oil fields and infrastructure the group has increased taxes on locals in strongholds such as Deir ez-Zor in eastern Aleppo. Meanwhile in Mosul, the group takes a cut of the salaries still being paid by the central government in Baghdad to formerly state employed residents of the city.
That raises the question, of course, of whether IS can deliver the welfare state that it frequently promises in its literature and propaganda and illustrates in regular and slickly produced videos from inside the caliphate. This is seen as a key reason that Sunnis in IS-held areas first allowed the group to bed in and equally in ensuring that opposition does not arise a year on.
But recent military victories such as Ramadi will have done much to bolster IS's reputation in Mosul, as well as convincing those who were opposing the group that they may be in for the long haul. The fall of Ramadi and the consolidation of IS control over the Anbar province suggests the liberation of Mosul is years rather than months in the future.
"Those who thought they would quickly wither on the vine financially, that is not coming to pass. Their finances are declining but not as rapidly as everyone would hope," said Keatinge.
One of IS's staple industries has been the smuggling of antiquities from looted sites in Syria and Iraq along established routes from northern Syria into Turkey and onwards to Antalya and Istanbul. Professor Louise Shelley, author of Dirty Entanglements: Corruption, Crime And Terrorism and an expert on the economics of terrorist insurgency, told IBTimes UK over the phone from Antalya that the trade was continuing to thrive in southern Turkey.
"Maybe Turkey are cracking down on some of the foreign fighters, but recently a very knowledgeable source was explaining to me that he drove two hours along near the Syrian border and there wasn't one police patrol that he saw on the road, so anything could be flowing through this area," she said.
Shelley said antiquities and textiles were on sale in Turkey, mostly from Syria but also from Iraq. Most were being smuggled along existing routes out of Iraq and Syria, with the only difference being that it was IS allowing and taking a cut of the trade rather than the militias or criminal gangs that may have operated in the area under Saddam Hussein.
"It is the same routes, it is the same facilitators, it is just different opportunities that they are taking advantage of," she said.
Both the existing and new sources of income show IS's willingness to adapt as well as its pragmatism. It smashes statues in Mosul but makes millions of dollars trading antiquities featuring the idols it claims to oppose. Likewise, it is willing to make money from human trafficking of Syrians as well as, presumably, African Christians, while also putting out propaganda videos showing fighters beheading Eritreans on a Libyan beach.
Like militias since the beginning of time, religious or otherwise, IS controls territory primarily to extract profit, profit that is needed to maintain the support of its populations through welfare and attract foreign fighters to the caliphate. Profit is also key in persuading Syrian militants that it should remain loyal rather than joining one of the many other militias fighting Syrian dictator Bashar al-Assad, including Jabat al-Nusra.
But whether it is the migrant crisis, the increase in smuggling or punitive taxes on residents of IS-held areas, cracking down on IS finance alone will not be enough to defeat the terrorist group either in Iraq and Syria or in Libya. The military campaign that has stalled in Iraq and made little progress in Syria – let alone the chaos embroiling Libya – needs to up its game.
Keatinge added: "You can't destroyed them simply by restricting their financing, you need other things to be in place – and at the moment those other things are not in place."