Like hundreds of people in city of Mosul, Munir turned to selling cigarettes on the black market after IS took over in June 2014, established its rule and applied its strict interpretation of Sunni Islam forbidding many things , including smoking.

When Munir paid his fine, IS asked for another 4,000 dinars — and when he asked why, he was told he had to refund what their agents had paid for his cigarettes.

"The lashes under my feet were very painful. I had to squat with my hands tied behind my back, and I was blindfolded so I would not recognize the Daesh [IS] who hit me as they were all from Mosul," Munir said. "I screamed that I had not sold cigarettes, but the Daesh guy would say, 'Ask for forgiveness from Allah.'"

Ala Munir was at home one blistering day in July last year when four IS militants turned up at his house in Mosul and began searching his property. There was nothing he could do to stop them, but the militants failed to check beneath the dropped ceiling where he had concealed what they were looking for: cigarettes. They took him in for questioning anyway, and an IS informer who had bought two packets of cigarettes from Munir testified against him in an IS court, landing him a 40,000 dinar fine ($34) on top of 22 lashes.

ERBIL, Iraq — Thousands of Mosul residents flee the city every day as the Iraqi army pushes farther into the city from the east. But despite suicide car bombs, airstrikes and the whizzing sound of bullets around them, when they emerge, one of the first things they ask for from the soldiers are cigarettes. For almost 2½ years, the Islamic State (IS) in Mosul projected an image that it was against the consumption of narcotics; in reality, however, it has reaped enormous funds from the trade.

Despite the ban, many Mosul residents did not give up, creating an underground economy in cigarettes on which IS would eventually capitalize to fund the affairs of its so-called caliphate.

As efforts to cut off the group’s finances yielded fruit, the militants resorted to fining and taxing its increasingly impoverished subjects, including cigarette smugglers. According to three smugglers who fled Mosul and are now living in camps in the Kurdish region, IS turned a blind eye to the smuggling and waited patiently for them to accumulate funds before busting them to maximize their haul.

"Burning cigarettes was for show," Munir said. "The reality is that Daesh was turning a blind eye and fined the smugglers lots of money."

IS earned thousands of dollars each month in fines for those who sold cigarettes illegally in Mosul alone. The petty smugglers were fined — anywhere between $30 to $50 — depending on how many times they were arrested; the fine for wholesalers was far heftier.

The US-led coalition has targeted the revenue stream of IS both in Syria and Iraq, such as the revenue in oil and smuggling in antiques, but stopping cigarette smuggling is far more difficult. IS "is overwhelmingly financed internally, mainly from sales of oil and gas, and taxation and extortion," said Adam J. Szubin, the acting undersecretary for terrorism and financial intelligence at the US Department of the Treasury. "Those types of internal revenue streams are, of course, very difficult to target in the same way you could with, for example, foreign donations or Islamic charities that are being corrupted by a terror group like al-Qaeda."

"Daesh knew the main traders and would allow them to bring cigarettes, and once they sold them, Daesh would swoop in and arrest the traders,” said Ibrahim Akram, a trader who sold cigarettes for four months in east Mosul this year and was detained four times. IS relied on spies in Mosul to inform them about who sold cigarettes; at the same time, they’re publishing photos of them burning cigarettes in which they claim to have cracked down on smuggling.

Safwan, a wholesaler who sold his cigarettes in four neighborhoods in east Mosul, said the demand was not only from locals but also surprisingly from IS fighters themselves. “There were many Daesh armed men who smoked cigarettes secretly," Safwan — who also resides in a camp in the Kurdish region with his family — said, preferring not to disclose his full name. "One particular Daesh whom I remember was Abu Salih Muslawi. [He] could not give up smoking, and I would give him one or two packs per day. In return he said, ‘Don't worry, I'll come to your rescue whenever they arrest you.’”

On a good day, Safwan says he earned around 300,000 dinars, a huge sum in Mosul at the time when there were no jobs and a taxi driver barely earned 15,000 dinars per day.

"The cigarettes came from Syria, and Daesh sanctioned it unofficially," said Safwan, estimating the number of wholesalers at 500 in the city, plus many more petty traders. "Daesh made an agreement with oil truck drivers and allowed them to smuggle 50 cartons in a compartment inside the truck in return for intelligence about the petty and main sellers."

Safwan said there were two routes for cigarette smuggling: One came from Shadadi in Syria, but as the Kurdish forces took the town, the smugglers turned to Bedouins in Anbar province and brought in their cargos.

Meanwhile, IS continues publishing scenes of burning piles of cigarettes both in Syria and Iraq that were seized from smugglers. Three bearded men stood by a pile of cigarette cartons burning in the town of Tabqa in Syria. "General Organization of Tobacco, Syria," read the boxes, as the flames billow from the pile.

"There was no work in Mosul, so many people like me had to sell cigarettes to make a living," said Munir, the petty smuggler. "The trade was good for everyone, including Daesh."