As a known arms dealer for rebels fighting Isis in his east Syrian home town, Abu Ali was sure his days were numbered when, a year ago, two jihadi commanders stepped out of their pickup truck and walked towards him.

Read next Isis Inc: how oil fuels the jihadi terrorists Jihadis’ oil operation forces even their enemies to trade with them

He was baffled when they handed him a printed paper. “It read, ‘This person is permitted to buy and sell all types of weaponry inside the Islamic State,’” recalls Abu Ali. “It was even stamped ‘Mosul Centre’.”

Rather than being detained or expelled as they had feared when the jihadi group swept through eastern Syria last year, many black-market traders such as Abu Ali were courted by Isis. They were absorbed into a complex system of supply and demand that keeps the world’s richest jihadi group stocked with munitions across a self-proclaimed “caliphate” spanning half of Syria and a third of Iraq.

“They buy like mad. They buy every day: morning, afternoon and night,” says Abu Ali, who, like others who have operated inside Isis territories, asked not to be identified by his real name.

Isis seized weapons worth hundreds of millions dollars when it captured Iraq’s second city, Mosul, in the summer of 2014. Since then, in every battle that it has won, it has acquired more material. Its arsenal includes US-made Abrams tanks, M16 rifles, MK-19 40mm grenade launchers (seized from the Iraqi army) and Russian M-46 130mm field guns (taken from Syrian forces).

But dealers say despite this, there is one thing Isis still needs: ammunition. Most in demand are rounds for Kalashnikov assault rifles, medium-calibre machine guns and 14.5mm and 12.5mm anti-aircraft guns. Isis also buys rocket-propelled grenades and sniper bullets, but in smaller quantities.

It is difficult to calculate the exact sums involved in Isis’s multimillion-dollar munitions trade. Earlier this year, skirmishes along the front lines near the eastern city of Deir Ezzor — just one of many Isis battlefields — required at least $1m-worth of munitions each month, according to interviews with fighters and dealers. A week-long December offensive on the nearby airport alone required another $1m, they said.

Isis’s need for ammunition reflects its battle tactics: the group relies heavily on truck bombs, suicide vests and improvised explosives during both advances and retreats. But the fast-paced fighting in between — mostly with Kalashnikovs and truck-mounted machine guns — can consume tens of thousands of bullets in a single day. Fighters say that ammunition trucks resupply various front lines every day.

To secure this supply, Isis runs a complex logistics operation, which fighters say is so critical that it is directly overseen by the higher military council that is part of the group’s top leadership. This is similar to the way it controls the trade in oil, the group’s main source of revenue.

The best sources of ammunition are Isis’s enemies. Pro-government militia in Iraq sell some supplies to black marketeers, who then sell on to Isis dealers.

Most of all, Isis fighters rely on their rivals in Syria’s three-way war between President Bashar al-Assad’s forces and the rebels fighting to topple both him and Isis. This is where Syrian arms dealers play a critical role. Abu Ali fled when asked to join their ranks but Abu Omar, a veteran black marketeer in his sixties, plunged into the trade.

“We could buy from the regime, the Iraqis, the rebels — if we could buy from the Israelis, they wouldn’t care, as long as they got the weapons,” says Abu Omar. Speaking to the Financial Times while knocking back whiskies at a bar in Turkey, he recounts his year as a gunrunner for Isis. He abandoned the trade in August, he says, after deciding Isis was “oppressive”.

Isis commanders provide stamped IDs for traders who have been officially approved by two members of Isis’s security branches. The group then imposes an exclusivity clause: the gun-runners can move freely and ply their trade — as long as Isis is the only customer.

The jihadis’ opponents are intrigued by the group’s ability to move huge supplies of munitions quickly during fighting. In northern Iraq, Kurdish peshmerga fighters recovered detailed documents of weapons and ammunition shipments outlining orders that had been made for the battles that had just ended.

“Within 24 hours, the ammunition was sent to them by car,” says one security official in Iraq, who asked not to be named.

Fighters and dealers credit the speed to the jihadis’ communications systems. A roving “committee” appointed by the top military council in Iraq speaks constantly with weapons “centres” in each province, they say, which in turn take requests from military emirs.

Exchanges between emirs and the “centres” can sometimes be heard on walkie-talkie frequencies by their enemies. From the Iraqi-Syrian border, Kurdish peshmerga fighters huddle around a device tuned to a crackling Isis frequency, as fighters shout for “kebab”, “chicken tikka” and “salad”.

“Kebab is probably a heavy machine gun,” says Abu Ahmad, a rebel commander from eastern Syria who fought under Isis until he fled to Turkey this summer. “The salad would be Kalashnikov ammunition. You’ve got explosive bullets, penetrating bullets — a mix, just like salad,” he laughs.

Abu Omar says he contacted the centres using WhatsApp, the mobile texting service. Every few days the roving committee issues price lists that the centres use for the bullets and grenades that are most in demand. The centre to which Abu Omar reported would text him any price updates. Dealers say their commission ranged from 10 to 20 per cent.

Prices are rising as US-backed coalition fighters drive the group farther from the Turkish border, limiting potential smuggling routes, Abu Ahmad told the FT. Isis has issued more licences to boost competition and lower prices, one dealer complained, leading arms traders to jostle for the same deals.

Most munitions come from Syria, now a source of weapons for the wider region. Gulf backers send their favourite rebel groups truckloads of munitions over the Turkish border. Corrupt fighters divert some to local dealers; the border provinces of Idlib and Aleppo have now become the biggest black market in the country, say locals.

Ideology hardly matters after five years of war, Abu Ahmad says. “Some (dealers) even hate Isis. But that doesn’t matter when it comes to making a profit.”

Dealers use a network of drivers and smugglers to hide munitions in trucks delivering civilian goods such as vegetables and materials for construction. “You have trucks moving in and out like crazy. They are always using things that aren’t suspect,” says Abu Ahmad. “Fuel trucks are used a lot, because they come back to Isis territory empty.”

Munitions from Moscow and Tehran that are meant for Mr Assad are another top source of weaponry bought on the black market, often in areas such as southern Suwaida. “They like Russian products,” says Abu Omar. “The Iranian stuff they will buy — but only cheaply.”

In an area with few economic opportunities left, stopping the trade becomes all the more challenging. Every time an arms trader flees, many more are desperate for a chance to make money.

“Today, it’s all about money. Nobody cares who you are . . . They just care about the dollar,” said Abu Omar.