BEIRUT—If you’re looking to transfer money here, there’s a chance you will be directed to Abu Shawkat. He works out of a small office in a working-class suburb of the Lebanese capital, but won’t give you its exact location. Instead, he’ll direct you to a nearby alleyway, and whether he shows up depends on whether he likes the look of you.

Abu Shawkat—not his real name—is part of the hawala system, which is often used to transfer cash between places where the banking system has broken down or is too expensive for some to access. If he agrees to do business, you’ll set a password and he will take your cash, then provide you with the contact information of a hawala broker in the city where your money is headed. Anyone who offers that specific password to that particular broker will get the funds. Thus, cash can travel across borders without any inquiry into who is sending or receiving it, or its purpose.

Hassan Hassan: The true origins of ISIS

In the case of neighboring Syria, U.S.- and British-funded projects have sent millions of dollars into the country using the hawala system, humanitarian organizations use it to pay staff, and Syrians working abroad depend on it to get money to impoverished relatives.

But Abu Shawkat runs the hawala equivalent of a mom-and-pop store: One of the giants of the industry, which analysts believe owns a network of money-services businesses and has moved millions of dollars a week, is the Islamic State.

Even as U.S.-backed forces wrest back the Islamic State’s last strip of territory in Syria, the United States and its allies are nowhere close to bringing down the terrorist organization’s economic empire. The group remains a financial powerhouse: It still has access to hundreds of millions of dollars, according to experts’ estimates, and can rely on a battle-tested playbook to keep money flowing into its coffers. That continued wealth has real risks, threatening to help it retain the allegiance of a committed core of loyalists and wreak havoc through terrorist attacks for years to come.

The Islamic State’s financial strength offers a window into the broader challenge facing the United States and other governments. In its effort to squeeze the group financially, Washington has been forced to rely on a fundamentally different strategy than it employed in its military campaign: The main weapons at its disposal are not air strikes and artillery barrages, but subtler tools, such as sanctioning Islamic State–linked businesses, denying them access to the international financial system, and quietly cooperating with governments across the globe. Successes will be less visible, the campaign against the group will likely take years, and there is no guarantee of victory.

The end of the Islamic State’s days of holding and governing territory represents a double-edged sword for officials looking to starve it of resources. On the one hand, its dramatic losses have made it far more difficult for the group to rely on two major sources of revenue: the exploitation of oil fields in Iraq and Syria, and the taxation of citizens living under its rule. These methods played a key role in allowing the Islamic State to raise roughly $1 million a day, a senior Iraqi security official, who declined to be identified discussing intelligence issues, told me, transforming the group into the world’s richest terrorist organization.

Read: The fuzzy math of funding Iraq’s reconstruction

On the other hand, the Islamic State’s loss of territory has freed it from the costs associated with trying to build its self-declared “caliphate,” allowing it to focus exclusively on terrorist activity. A U.S. Treasury Department official, who spoke on the condition of anonymity, said that the group is operating increasingly like its insurgent predecessor, al-Qaeda in Iraq, and no longer requires the same resources it did when it governed territory. Oil still brings in revenue too: While the Islamic State no longer controls individual fields, the Treasury official added that a key source of the group’s income is the extortion of oil-supply lines across the region.

The Islamic State is also still sitting on the massive windfall that it built up during the height of its power. “What we know is that they accumulated large amounts of cash and other assets,” said Howard Shatz, a senior economist at the Rand Corporation and co-author of several studies on the Islamic State’s finances. “We don’t know where it all went.”

Some of those funds appear to have been invested in legitimate commercial enterprises. In October, a series of raids on Islamic State–linked businesses in the Iraqi city of Erbil uncovered a paper trail that suggested the group had invested in everything from real estate to automobile dealerships. These businesses are often run by middlemen who partner with the group not out of ideological sympathy but for profit, and then funnel revenue to the Islamic State when called upon.

The senior Iraqi security official told me that the bulk of the Islamic State’s assets had been transferred to Turkey, though the Treasury Department has sanctioned its money-services businesses in Syria and Iraq, which have connections as far away as the Caribbean. Some of these funds are reportedly held in cash by individuals in Turkey, while a portion has also been invested in gold. There is precedent for Ankara turning a blind eye toward the terrorist organization’s activity on its soil: The group used to make millions of dollars by selling smuggled oil to Turkish buyers. The October raid in Erbil also targeted the financial network built up by Fawaz Muhammad Jubayr al-Rawi, an Islamic State leader who the Treasury Department claims owned and operated Syria-based money-services businesses that exchanged money with Turkey. The Turkish government has consistently denied providing safe harbor to either Islamic State individuals or the group’s assets.

The war-ravaged states of Syria and Iraq also provide the Islamic State with ample opportunities to revive the tactics that financed its predecessor organization. From 2008 to 2012, when al-Qaeda in Iraq was driven underground, it operated much like a mafia: It skimmed construction contracts, particularly in the northern Iraqi city of Mosul; stole goods and resold them; and kidnapped members of wealthy families for ransom. Despite its straitened circumstances, the group was recording monthly revenues of nearly $1 million just in Nineveh province, of which Mosul is the capital, in late 2008 and early 2009.

Today it has even more factors working in its favor. The destruction of areas of northern Iraq once controlled by the Islamic State has necessitated a massive reconstruction effort. At a conference last year, countries pledged $30 billion to rebuild the area, a figure that is still well below what the Iraqi government said it needs. Perversely, such a massive injection of funds provides the Islamic State with even more opportunity to benefit from corruption. Declassified documents show that senior Iraqi, Kurdish, and Turkish politicians had dealings with al-Qaeda in Iraq in 2009; oversight of how funds are spent is likely even worse now, given the magnitude of the task. Second, the Islamic State kept meticulous records about the approximately 7 million to 8 million people living under its rule during the height of its power. If it retained control of those records, it could use them to extort Iraqis and Syrians.

“If you lived in ISIS territory, they know where you live, they know much money you make, and they know what your business is,” Shatz told me. “They can go to a businessman and say, ‘You must be very proud of your son. It would be a pity to see something happen to him.’”

Read: The U.S. will spend billions in Syria—just not on rebuilding it

Like any smart multinational conglomerate, the Islamic State has diversified its streams of revenue. Even if the United States and its allies manage to cut off, for example, the group’s kidnap-for-ransom business, it can turn to those commercial enterprises and extortion rackets.

The situation is far from hopeless. The United States has already made a dent in the Islamic State’s finances by targeting its oil network, and the group may find that its meticulous records can be used against it: Once captured, those records could provide a detailed overview of its personnel and sources of revenue. But there are no silver bullets.

Abu Shawkat’s market advantage is that he can send money to places where formal institutions have crumbled. The Islamic State’s business model relies on similar factors, only on a much grander scale. It aims to exploit state breakdown as a way to fund its main product: political violence. That violence then weakens the state further, creating more financial opportunities for the terrorist organization.

The military victory against the Islamic State is cause for celebration, but it also allows the group to fall back on an economic strategy that has served it well for years. Don’t expect it to go out of business anytime soon.