THE cafés on Abu Dhabi’s seafront fill as soon as the sun sets and the heat abates. Men gather around water pipes, smoking tobacco flavoured with melon, berry or perhaps even cappuccino. A thin boy scurries from table to table with a bucket of hot coals. Those enjoying such evening idylls may not know it, but their love of smoking shisha is fuelling a bloody insurgency more than 3,000km (1,864 miles) to the south, in Somalia.

The production and export of charcoal is an unlikely but important source of revenue for the Shabab, a militant group that rules swathes of Somalia and has been battling against troops from the African Union and the fragile Somali government. Charcoal made from Somali acacia trees is particularly prized in the Gulf, because it burns longer than alternatives from, say, Sudan or Nigeria. This quality comes at a price: Somali charcoal retails for about 15 dirham a kilogram ($1.85 per lb), compared with about 9 dirham for the inferior stuff.

In 2012 the UN banned exports of Somali charcoal, yet the prohibition seems to have been observed mostly in the breach. Indeed, revenues earned by the Shabab have increased since the ban, say UN investigators. They reckon the Shabab took more than $25m off trade worth as much as $384m in the year to May, through “taxes” imposed on the transport of charcoal and “shareholdings” in the smuggling business. Charcoal exports are one leg of a circular trade that pays for the imports of weapons from Yemen, a short hop by boat across the Gulf of Aden.

On October 5th African peacekeepers and Somali forces captured Barawe, the Shabab’s last major port, which lies between Kismayo and the capital, Mogadishu. But the victory may not much dent the Shabab’s charcoal revenues. Most of the trade had already been shifted south to Kismayo. One reason may be that, when it comes to sharing the profits from charcoal, bitter enemies can quickly turn into unacknowledged friends. The UN investigators claim, in a report presented to the UN Security Council, that profits from Kismayo’s exports are divided between rebels, the region’s government and members of the Kenyan army—which has guarded the port since its capture from the Shabab in 2012.

Ports are but one link in a long supply chain that is taxed by the Shabab and other middlemen, including the regional government. At one end are the groups of men, 10-20 strong, who are hired by charcoal traders to cut down acacia trees, some of which are 500 years old. One consequence is massive deforestation and desertification across Somalia, forcing nomadic herders off their lands.

The wood is then hauled by donkey cart to crude kilns dug into the earth, where it is partially burnt for up to ten days before being allowed to cool for another ten. The people doing this hard labour see few of the rewards.

Much of this charcoal is loaded onto small dhows, often owned by Indians, and larger merchant ships. It is then taken to various Gulf destinations, including the United Arab Emirates, Kuwait and Oman, often under false paperwork. Shipping charcoal from Somalia is not without its risks, given the prevalence of another sort of illegal activity—piracy. UN investigators found two instances in which ships carrying illegal cargoes of Somali charcoal were hijacked off the coast of Barawe.

The continued trade is prompting some countries to argue for the imposition of tougher measures. One idea is for international anti-piracy naval forces to stop and search vessels leaving Somali waters. Better, however, may be the proper enforcement of sanctions in the Gulf states where, for the time being at least, compliance with the UN ban is about as substantial as the smoke issuing from a shisha.