As the Islamist militants retreated from former strongholds in Iraq and Syria, they carried vast sums in Western and Iraqi currency and gold coins — a trove estimated by independent experts to total about $400 million — nearly all of it looted from banks or acquired through criminal enterprises.

While some of this treasure was buried or hidden away, the group’s leaders have laundered tens of millions of dollars by investing in legitimate businesses throughout the Middle East over the past year, the officials said. The money is partly intended, analysts say, to fund a future resurgence of the Islamic State, a prospect that some experts fear could be hastened by the rapid U.S. troop withdrawal from Syria announced by the Trump administration this week.

AD

AD

New insights into the group’s financial holdings have emerged from raids in recent weeks on businesses in Baghdad and Irbil, in Iraq’s semiautonomous Kurdish province. Investigators traced the flow of millions of dollars in Islamic State revenue through banking networks with links to Turkey and the United Arab Emirates as well as Iraq and Syria.

Kurdish officials said the trail of Islamic State money led to an astonishing array of legitimate commercial enterprises, including real estate companies, hotels and automobile dealerships. In one case, terrorist money was used to buy shares in a carwash business.

“They can’t make money anymore by selling oil, so they’re making it other ways,” a counterterrorism official with the Kurdistan Regional Government’s Counter Terrorism Department said in an interview. The official, who helped direct a series of raids by the department’s counterterrorism unit on Iraqi businesses in Irbil in October, spoke on the condition of anonymity to discuss the ongoing investigation into private businesses that were helping the Islamic State launder money.

AD

AD

Some of the businesses that received cash may not have been aware that the investors were terrorists, while others appear to have happily looked the other way, the official said. One of the targeted businesses, the Iraq-based al-Rawi Network, moved up to $500,000 a day to operatives in Turkey, the official said. In addition to investments and money laundering, some of the funds appear to have been intended for more operational uses, he said.

“They continue to fund terrorist activity. They also use the money to pay the salaries of fighters and to support their families,” the official said. “Some of it even goes to pay for lawyers to help their people who are in prison.”

The Islamic State’s millions are the remnants of a much larger fortune seized by the terrorists after their takeover of Syrian and Iraqi cities four years ago. In June 2014, the group captured Iraq’s second-largest city, Mosul, and quickly emptied out bank vaults there, acquiring by some estimates $500 million in currency and gold.

AD

AD

The group also took control of oil fields, mines, factories and farms in Iraq and Syria, and it soon established a network of moneymaking enterprises that extracted profits from commodities ranging from petroleum and minerals to archaeological artifacts, most of it sold on the black market. Millions of citizens in the self-declared caliphate also were subjected to heavy taxes and fees.

By 2015, the caliphate’s cumulative holdings and earnings totaled as much $6 billion, according to estimates by some independent analysts. By any measure, the wealth controlled by the terrorist group was staggeringly large, said Daniel L. Glaser, a former Treasury Department official in charge of investigating terrorist financing during the Islamic State’s heyday.

“The sheer size and location of [Islamic State] territory gave it access to oil resources, taxation revenue and cash in bank vaults that was qualitatively different in scope than anything we had seen before,” said Glaser, who is now a principal officer at the Washington firm Financial Integrity Network.

AD

AD

The U.S.-led military coalition against the Islamic State began aggressively targeting the group’s finances in 2014. U.S. warplanes dropped bombs on storage bins filled with stolen currency and disabled terrorist-controlled oil fields, refineries and tankers. Beginning in 2015 and culminating last year, the coalition liberated Iraqi and Syrian cities and towns, cutting off the group’s remaining major revenue sources.

But the loss of turf also eliminated the Islamic State’s biggest expenses: salaries, maintenance and other financial burdens that come with governing territory, according to intelligence officials and experts.

“Without a caliphate to run, they no longer have the kind of operating costs they once had,” said Colin Clarke, an expert on terrorist financial networks with the Soufan Group, a New York firm specializing in security consulting. “The territory they now control, around the Hajin [Syria] pocket, is less than 1 percent of area held by the caliphate, so they’re not spending a lot of money at all.”

AD

AD

Clarke, author of the 2015 book “Terrorism, Inc.,” has calculated that the Islamic State possessed about $400 million at the time of the caliphate’s collapse last year, a figure that Middle East intelligence officials describe as a reasonable estimate, based on their own investigations.

Iraqi officials say large caches of gold and currency were simply buried in the desert — including in one underground vault that was discovered last year under a sand berm south of Kirkuk.

Much of the rest has been secretly laundered and squirreled away in bank accounts and investments, officials said, at the direction of Islamic State officials who realized years ago that their caliphate might not survive.

AD

“We’ve seen people moving money through cutouts and proxies into correspondent banks, mostly in southern Turkey,” Clarke said. “With so few debits, they have more than enough money for a rainy-day fund. It’s easily enough to run a low-level insurgency in and around the border areas for the next decade. And that is without bringing in more money, which they’re now looking to do.”

AD

Yet, as intelligence officials acknowledge, the challenge of discovering and halting the Islamic State’s illegal streams of cash is getting progressively harder as the group’s territorial holdings shrink. Iraq’s al-Rawi Network operated for years as a legitimate financial services business before Kurdish investigators learned that it was being used by the terrorists.

“We watched them for a while,” said the Kurdish counterterrorism investigator involved in the Irbil raids, which led to the arrests of eight people in October. “When we saw that [Islamic State] money was involved, we intervened.”

AD

Only during subsequent investigations did the officials learn the true scale of the Iraqi operation, he said. “Many millions of dollars were moved,” he said.

Iraqi officials have concluded that the residual cash could be helping finance what they describe as steadily rising violence in the northern provinces near Mosul and Kirkuk. More than a year after the liberation of those areas, Islamist assailants have carried out scores of assassinations and bombings in recent months, most of them aimed at tribal and government leaders and police officers. It is all part of what officials fear is the Islamic State’s transformation into a shadowy insurgency that, while powerful and lethal, is now much harder to see and confront.