People inspect damage at an oil refinery that was targeted by air strikes at al-Khaboura village, near the Syrian town of Tel Abyad of Raqqa governate, on Oct. 2, 2014. (STRINGER/Reuters)

It once made over $1 million per day in Iraq alone, but now the IS oil sector, which lured hundreds of foreign workers, is struggling to meet its internal demand.

An intensifying campaign of U.S. air strikes on the self-proclaimed Islamic State (IS) has nearly shut down its oil operations in Iraq and has hampered its more lucrative business in Syria, eroding the group's largest source of financing and threatening its ability to govern territory.

Iraq Oil Report has compiled a comprehensive history of the IS oil sector based on the organization's own records, details of which have just been declassified by the U.S. government and are being published here for the first time. Those accounts have been broadly corroborated by the first-hand testimony of residents and oil workers in IS-occupied territory.

They show that, until recently, nearly 2,000 IS oil workers, many recruited from abroad, were able to outfox early U.S. attempts to derail the group's oil operations. From the end of 2014 through May 2015, even after being hit by a series of air strikes, the highly bureaucratic and organized operation generated as much as $40 million per month from the sale of crude oil. (The IS organization generated millions more by taxing transportation and refining, though the U.S. officials declined to give more detailed figures.)

"From the documents, we see this: oil has traditionally been approaching 50 percent of their profits. And the other 50 percent was the total of all the other things," said Amos Hochstein, the State Department's Special Envoy for International Energy Affairs, who is at the center of the U.S. government's efforts to identify weaknesses in the IS group's oil sector.

The U.S. gained unprecedented insight into those operations after American special forces conducted a raid in May 2015, in which they killed the IS leader in charge of its oil assets in Syria, known as Abu Sayyaf, and captured his records of the sprawling operation. It was the largest trove of intelligence ever yielded from a single special forces raid, composing nearly seven terabytes of data, Hochstein said.

The revelations from the Abu Sayyaf raid prompted a more aggressive air campaign against the IS oil sector, named Operation Tidal Wave II, which began in October.

"We are already seeing a degraded capability from the beginning of Tidal Wave II, in terms of management of fields and transporting crude and fuel," Hochstein said. He, along with a second U.S. official, gave separate briefings to Iraq Oil Report on the Abu Sayyaf documents and the ways in which those revelations have shaped military strategy.

Abu Sayyaf's records confirmed that strikes on field infrastructure - including pumps, flow lines, manifolds, and even wellheads - could not stop production entirely, and in some cases took facilities offline for only a few days. Many of the 200-plus wells controlled by IS have enough natural pressure to gush oil without any mechanical assistance, albeit at reduced rates, and even when equipment could not be repaired, field workers resorted to rudimentary methods such as digging nearby pits to collect and store crude until it could be pumped onto trucks, according to the second U.S. official.

"As long as they control territory, the question becomes not 'how do you stop them from producing,' but 'how do you make sure that, for the interim period they still hold territory, that they derive as little profit as possible from oil, and minimize their ability to use it in their governance efforts,'" Hochstein said.

A broad array of military operations - by federal Iraqi forces, Kurdish Peshmerga forces, the U.S.-led coalition, and Iran-backed paramilitary forces - have already succeeded at taking back almost all of the oil assets that IS militants once controlled in Iraq. The Tidal Wave II campaign now focuses on the group's remaining oil assets, which are concentrated in Syria, but also include Iraq's Qayyarah field and refinery, about 80 kilometers south of Mosul.

In more than a dozen interviews, residents in IS-occupied areas of Iraq said this intensified military pressure is being felt on the ground. The IS group is now struggling to provide basic services: prices of fuel, food, and other goods have shot up recently, while fuel shortages have affected the availability of electricity and, in some areas such as Mosul, running water.

"Everything used to be okay," said a resident of Qaim, a city in western Anbar province near the Syrian border, who fled the area in November. "We had food, fruits, fuel. But this started to diminish in 2015... Now, there isn't healthy drinking water, and foods and medicines are in short supply. The people are suffering from despair because Daesh is controlling their fate."

That kind of economic pain appears to be a primary goal of the U.S. strategy.

A center of profit and power

The IS group draws much of its strength - financially, militarily, and ideologically - from its ability to perform many functions of a state. Oil has been centrally important to that ambition, not only providing financing and fuel for military operations, but also powering an economy whose success has the potential to bolster the organization's popular legitimacy.

Throughout much of 2014, as the group seized territory in northern and western Iraq, it exerted control largely through violence, conducting massacres and imposing brutal laws based on an extreme interpretation of Islam. But another hallmark of its governance was a commitment to provide basic services; residents of Mosul, Fallujah, and several cities in western Anbar province say the group facilitated a reliable supply of cheap fuel, most of which was produced and refined in Syria.

"In early 2014, fuel was available, delivered smoothly by Daesh," said a former employee of an electricity directorate in an industrial area near Anah and Rawa, in western Anbar, who left the area in late November 2015. "It used to be delivered from Deir ez-Zor [in Syria] to Qaim, and then to Rawa, Anah, Heet, Rutba, and down to Fallujah."

A liter of diesel fuel cost 450 Iraqi dinars (about $0.38 per liter, or $1.42 per gallon), and enough was delivered to generators so that residents enjoyed about 6 hours of electricity per day, the electricity official said. Other IS-occupied areas enjoyed similarly cheap prices, according to residents interviewed by telephone over the past month: in the summer of 2014, unleaded gasoline cost 500 dinars per liter in Mosul, and as little as 300 dinars per liter in Qaim, near the Syrian border.

Abu Sayyaf's records showed exactly how this operation worked.

In contrast to the military side of the IS group, which gives substantial autonomy to regional commanders, management of the oil sector was highly centralized, according to the second U.S. official. This close, top-down scrutiny helped the group allocate resources to the right wells, maximize profit margins, and root out corruption within the ranks.

"ISIL obtained official Syrian Ministry of Petroleum and Mineral Wealth schematics, production data, and geological studies," the second U.S. official said. "This enabled them to prioritize areas and schedule maintenance for key oil wells."

The U.S. officials declined to share Abu Sayyaf's records of oil production, but Iraq Oil Report has learned from a variety of sources - oil field workers, IS members, and other participants in the oil trade - that the group has sold its oil to middlemen for between $10 and $20 per barrel, depending on the quality of the crude. To generate $40 million per month at those prices - as the IS group sometimes did before May 2015 - it would have needed to hit production levels of more than 70,000 barrels per day (bpd).

The IS group managed 200-plus producing wellheads in its area of control, and set prices low enough that thousands of tanker truck drivers - many of whom had been trading in black-market oil since the early 1990s - would have incentive to buy. Then, the organization also levied taxes along the value chain.

"They make profit at the point of sale, and then they tax it again and again as it goes through the process," Hochstein said. "As it's sold to the refinery, they pay a tax. As the refinery sells that product, they get taxed."

The IS organization had to purchase a portion of the refining output for military and other official uses, the U.S. officials said, but its centralized control enabled it to turn big profits. By setting prices at the wellhead, and then taking margins along the value chain, the group could ensure its crude revenues would well exceed its fuel expenses.

"The Abu Sayyaf documents show close monitoring of the sale of oil, close scrutiny of employees, and tremendous discipline exercised at the very top, by Abu Sayyaf," the second U.S. official said. "They conducted audits, noted discrepancies, worked to reconcile differences - as you would in a typical accounting operation."

Abu Sayyaf's records showed that he "had direct access to ISIL's top leadership," the official said, "which is a reminder of how important his operation was to the organization as a whole."

Ingenuity and resilience

The U.S. military did not need to see internal IS documents to know that oil was centrally important to the group, even if the government did not yet fully appreciate how robust the operation had become.

In late 2014, months before the Abu Sayyaf raid, the U.S.-led coalition began targeting refineries in IS-occupied territory - both larger facilities that had been captured by IS and smaller modular units that had been imported and assembled.

Those strikes "took out the vast majority of their standing refining capacity," Hochstein said.

By early 2015, the price of unleaded gasoline had tripled in Mosul, to 1,500 dinars per liter (about $4.73 per gallon), and more than quadrupled in western Anbar, to 2,000 dinars per liter in Rutba and 3,750 dinars per liter in Qaim (about $6.30 per gallon and $11.83 per gallon, respectively), residents of the respective areas told Iraq Oil Report. Kerosene had been plentiful, but its price more than quadrupled - in Mosul, from just over 300 dinars per liter in mid-2014, to over 1,500 dinars per liter the following spring.

But the IS group's oil sector would soon recover, to a degree that U.S. planners had not anticipated. As the intelligence from the Abu Sayyaf raid would later reveal, the oil operation drew on a large, international staff with substantial expertise.

As the Deputy Emir of the Islamic State's Ministry of Natural Resources responsible for the group's Syrian territory, Abu Sayyaf oversaw about 125 ideologically committed members of IS, who in turn managed another roughly 1,600 oil workers, many of whom had been recruited from abroad. According to the second U.S. official, Abu Sayyaf's records show that these personnel were thoroughly vetted to ensure they were sympathetic to the IS cause, but they were also enticed with "globally competitive" salaries at a time when the oil industry was undergoing waves of layoffs.

"Some are from the region, and some from farther away - in the Maghreb, the Gulf, and some from southeast Asia," Hochstein said. "They were mining that expertise, but also cautious to get people who came with recommendations. So there's a real Star Wars bar scene."

In written reports to Abu Sayyaf's office through early 2015, many of those oil experts detailed how they were able to repair facilities that had been damaged in air strikes, according to the second U.S. official. Abu Sayyaf also had videos showing both overhauled infrastructure and backup measures that were implemented in places where facilities had been destroyed.

The IS group's oil leadership also succeeded in creating what now amounts to a thriving private sector of small-scale refiners who require little or no specialized equipment - only basic techniques and adequate economic incentives. Employing a technique known as open-pit refining, they essentially dig holes in the ground in which they heat up the oil through a rudimentary still, which is the most basic way to separate usable fuels from the heavier elements of crude.

There are many drawbacks to open-pit refining, compared to modern refineries: they produce relatively low-quality fuel; they fail to capture as much usable fuel from each barrel of crude; and they badly pollute both the air and ground water.

"What we are essentially doing is taking them from a 21st Century operation, which they inherited when they took over the territory, back to a 17th Century mode of operation," Hochstein said. "And that is going to reduce their ability to profit from oil."

Nonetheless, the proliferation of open-pit refineries succeeded in restoring a significant portion of the capacity that IS had lost to air strikes. The resilience of the IS oil operation became evident to civilians as supplies began to rise and prices began to subside: by the summer of 2015 in Mosul, for example, the prices of unleaded gasoline and kerosene were both about 750 dinars per liter - more than they had been a year earlier, but half as expensive as their winter peak.

Tidal Wave II

It took months for American analysts to translate and compile Abu Sayyaf's records into a coherent picture of the IS oil sector. Once they did, it caused a significant shift in the military campaign, resulting in Operation Tidal Wave II. (The original Operation Tidal Wave was an unsuccessful attempt to bomb the Axis petroleum network during World War II.)

Since the U.S.-led coalition began air strikes against the IS group, in August 2014, it had tended to prioritize military targets, such as infantry positions and armored truck bombs, often in direct support of allied Iraqi ground forces. Oil infrastructure was viewed as a financial target with less battlefield urgency, according to several U.S. officials familiar with the air campaign.

That changed with the Abu Sayyaf intelligence. It highlighted the extent to which IS leaders had placed oil at the center of their organization.

"They want to be seen as a state," Hochstein said. "So they need energy, not just for profits but also for symbolizing the difference between them and other terrorist organizations - that they control territory and provide electricity and fuel. That's also a vulnerability in their operation."

The documents also showed how surprisingly well the oil sector had bounced back from an ostensibly crippling round of air strikes.

"We learned from our own mistakes in the early days, of not assuming their rebuilding capacity and engineering," Hochstein said. "We're not in that game anymore. If you're going to rebuild it, we're going to re-hit it."

Tidal Wave II has featured two primary categories of targets. First, analysts have used their new knowledge of the IS group's available equipment and technical capabilities to hit specific pieces of oil field infrastructure that will be particularly difficult to work around or replace. As a result, overall production has likely fallen significantly.

Second, American air strikes have blown up nearly 400 tanker trucks in an effort to slow down transportation and drive up costs. (Tanker trucks also appear to have been targeted in French, British, and Russian air strikes; those figures are not included in the U.S. military's tally.) So far, the strikes appear to have targeted trucks mainly when they are clustered together, waiting to pick up crude.

"It has slowed the operation down considerably," Hochstein said. Aerial imagery has shown "that trucks no longer line up in these massive lines... they are grouping farther away from the collection points, in smaller groups. It takes longer to get to the collection point to pick up your oil."

As the risks increase for truck drivers, U.S. officials said, they are also demanding higher rates, which is further eating into the IS group's revenues. The officials did not say how they know those margins are being hurt, or by how much, and Iraq Oil Report could not immediately corroborate those claims.

It is clear, however, that the oil sector is again feeling the squeeze. By November 2015, unleaded gasoline and kerosene in Mosul both cost 2,000 dinars per liter ($6.31 per gallon), according to residents there - quadruple the price in summer 2014. Diesel-generated power was only available for two hours per day.

In Rutba, in western Anbar, gasoline and cooking oil were entirely unavailable at any price as of November, and electricity was scarce, according to a former resident who fled to Baghdad.

"The shares of diesel were drastically reduced," the Rutba resident said. Shortly before he left, "many electricity generators were turned off."

Rising pressure

A further benefit of the Abu Sayyaf intelligence is that U.S. officials have gained a picture of how the various pieces of the oil sector fit together. This holistic view of the IS organization appears to have informed a series of military operations that have tightened a noose around Mosul, the single largest city held by IS.

In the second week of November, an array of Kurdish forces massed to retake Sinjar, cutting off the main supply route between Mosul and IS-occupied territory in Syria. That represented a significant setback for IS, not least because it helped choke fuel supplies, which led to spiking prices.

The economic pain was likely sharpened because the Sinjar operation coincided with an air campaign against oil infrastructure at Qayarah, around 80 kilometers south of Mosul.

The only Iraqi oil field still held by IS, Qayarah has produced no more than a few thousand barrels per day of crude, which is so heavy that it yields relatively little fuel and is sold for just $10 per barrel, according to an oil worker there - a small prize compared to some fields in Syria. But Qayarah is also the site of a refinery with a nameplate processing capacity of 4,000 bpd, which both the U.S.-led coalition and Iraqi forces had been reluctant to destroy, presumably in hopes that the infrastructure could be recaptured intact.

That cost-benefit analysis appeared to shift with the Sinjar offensive. Just as Mosul was pinched from the west, air strikes began to cripple its other potential source of fuel, to the south.

From mid-October through December, the U.S.-led coalition has conducted more than a dozen air strikes in Qayarah, according to Pentagon statements. They initially appeared to target ancillary buildings and tanker trucks, but shortly after the Sinjar offensive, the U.S. military said it had hit two gas-oil separation plants and a "refining facility" in Qayarah.

Residents and oil workers have also witnessed several attacks on dates when the coalition has not reported activity in Qayarah. Iraqi Oil Minister Adil Abd al-Mahdi said recently that the Iraqi military had also been conducting strikes there, although the Ministry of Defense has not confirmed specific operations.

One such attack, on Nov. 9, killed an IS leader named Hamdi Arfyala, who was in charge of the Qayarah refinery, according to a member of the refinery's technical staff who still works there; the job was later given to another IS leader known as Abu Bander. More recently, on Dec. 23, air strikes hit refinery storage tanks as well as several tanker trucks, according to another person at the facility.

In total, from the beginning of November through December, at least 30 air strikes have hit Qayarah - roughly one every other day - with more than half of them targeting oil trucks or oil infrastructure, according to an Iraq Oil Report analysis that cross-referenced U.S. military statements and eyewitness accounts. IS fighters have responded by staging five rounds of executions, killing 28 people accused of collaborating with the enemy, according to witnesses.

The effect on Mosul has been stark: not only have fuel prices gone up, but the city has also lost water service. The pumps running the distribution system had been powered by generators that require high-quality fuel, which is no longer available, according to residents. Instead, people now have to buy water from tanker trucks that bring it from the Tigris River.

Defunct exports

In the summer of 2014, after IS militants seized Mosul and much of northern Iraq, the organization enjoyed a brief oil bonanza.

Fighters had captured not only producing fields with intact infrastructure but also storage tanks and pipelines holding millions of barrels of oil and refined fuel. The available supply far outstripped demand in IS-occupied territory, leaving plenty of surplus for export.

Moreover, the IS group quickly found ways to push that product beyond its borders. It had not yet opened direct hostilities with either the Iraqi Kurdistan region or Turkey, meaning that some mid- and low-level border guards were taking bribes and allowing oil to enter from IS-occupied territory.

According to an Iraq Oil Report investigation - the first and only on-the-ground account of the IS organization's brief Iraqi export trade - smugglers were jumping at the chance to buy trucks of oil for $26 per barrel, making huge margins selling to unlicensed refineries in the Kurdistan region during a time of high global prices. The IS group was then earning more than $1 million per day just from the Iraqi side of its oil operations.

But that heyday was brief. The Kurdistan Regional Government (KRG) moved aggressively to close its southern border to oil tankers in August 2014, making public examples of corrupt checkpoint guards caught taking bribes. And pro-government forces retook the Hamrin and Ajil fields in early 2015, which had been the most prolific Iraqi assets captured by IS.

While the reality on the ground has changed drastically, public perception has often lagged far behind. Press reports continue to suggest the IS group is financed through smuggling routes that have been largely dormant for more than a year.

The single biggest obstacle to IS oil exports has been simple economics. The group can no longer generate enough fuel to comfortably meet demand within its own territory, as evidenced by high and volatile prices: there is virtually nothing left to export. Moreover, global crude prices are now so low that, even if smugglers were able to cross international borders, the expense of the trip - measured in fuel, time, and bribes - would likely erase any profits.

"Moving that oil across great distances when there is a local market in Syria simply doesn't make that much sense," Hochstein said.

No easy victories

Despite the intensified military efforts, the IS group is continuing to show signs of resilience.

By mid-December, open-pit refineries had begun to spring up around Mosul. While residents have suffered from the noxious fumes, they also say fuel prices have eased: unleaded gasoline is now 1,250 dinars per liter (about $3.95 per gallon), which is high compared to a year ago, but still lower than the November spike.

Most importantly, perhaps, the IS group continues to hold key territory despite its recent failures to provide basic services.

In Fallujah, for example, a gallon of gasoline is 2,250 dinars per liter ($7.10 per gallon) and vegetables cost 3,000 dinars per kilogram - roughly twice the price in Baghdad, just to the east. Cooking oil is so scarce that some residents say they are heating their food by dismantling their doors for firewood.

Despite such hardships, they are not leaving the city in the kind of exodus that might deal a blow to the IS organization's credibility as a would-be state - not because residents believe in the group's ability to govern, but because they see no better alternative. Not only do IS militants prevent civilians from leaving, but many of those who managed to escape have been met with hostility as they try to enter Iraqi government-controlled territory.

Without strong state institutions that protect the rights of minorities - and as long as some powerful paramilitary forces are not accountable to the government - Iraq and its allies cannot capitalize on the ways in which military operations are undermining the IS organization.

"The government is unable to open a channel for the innocent," said a carpenter living in Fallujah. "Militias await on the roads [between Fallujah and Baghdad] to hunt people.... People here say that we are dead anyway, so let's die in our houses."

Ben Van Heuvelen reported from the United States, Istanbul, and Dubai. Iraqi staff reporting from Mosul and Baghdad are anonymous for their security. Jamal Naji reported from Baghdad and Erbil. Ben Lando reported from the United States.