IRBIL, Iraq — More than a year after the collapse of its self-declared caliphate, the Islamic State is sitting on a mountain of stolen cash and gold that its leaders stashed away to finance terrorist operations and ensure the organization’s survival years into the future, intelligence officials and terrorism experts say.

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, 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.

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, from real estate companies and hotels to 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.

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 half a million dollars 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.

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.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.