A long-running theme in the debate over Syrian refugees is that camps in the Middle East can serve as a more cost-efficient and safer method of helping refugees than resettling them in Europe or the United States. Yet this view ignores the hidden dangers lurking in large, usually ungoverned, refugee camps. Displaced people warehoused in camps can become alienated and radicalized. The camps can be infiltrated by terrorist groups, and can fuel tensions between refugees and overstressed host countries. Indeed, regimes have used chaotic, crowded refugee camps to undermine rival governments.

The story of the Nahr Al-Bared refugee camp in Tripoli, Lebanon illustrates many of the dangers relying unreflectively on camps.

Nahr Al-Bared, which was originally built in 1949 to house Palestinian refugees, became a focal point for tensions between Syria and Lebanon in 2007. In 2003, Syria encouraged thousands of Islamist jihadists to pour into Iraq after the American invasion. Some reports say that the Syrian government even provided buses and offered discounts on passports. During the so-called “surge” of American forces and the Anbar Awakening in 2007, many of these jihadis retreated from Iraq back into Syria.

Understandably, Syrians weren’t thrilled about it, and the returning fighters were pushed into Lebanon. As it happens, the Syrian regime had ties to a terrorist group, Fatah al-Islam, based in the Nahr Al-Bared refugee camp in Lebanon, and the Syrian jihadis who had been fighting in Iraq connected with this group. Fatah Al-Islam was using the teeming lawlessness of the camp to hide from Lebanese law enforcement, and plot against its government with impunity.

In the summer of 2007, a war broke out in Nahr Al-Bared, when Fatah al-Islam, backed by the extremist Syrian fighters from Iraq, resisted police action in the camp and opened fire. The violence quickly spread, with the extremists using amassed weaponry to entrench positions in the camp. According to Lebanon, the Syrian regime actively promoted the conflict in a bid to undermine the ruling Lebanese government. As a result, Lebanon (an American ally), experienced its worst internal violence since the 1975-1990 civil war.

The attempt to take advantage of the chaos of the refugee camp may have backfired on Syria. According to Charles Lister, a scholar at the Middle East Institute, once the Lebanese army beat back the jihadis in Nahr Al-Bared, many of them returned to Syria. Now angry at the Syrian government for throwing them into a war they couldn’t win, they waged attacks on the Syrian regime in 2007 and 2008. Many were arrested. However, Bashar Al-Assad pardoned some of these fighters during the 2011 Arab Spring protests. These released jihadis, Lister says, helped create the network that the Islamic State and al-Qaeda affiliate Jabhat al-Nusra used to turn the Syrian secular protests into the devastating civil war that caused the current refugee crisis.

Taking all these facts into account, it becomes difficult to ignore that the Syrian civil war, and the greatest refugee crisis since WWII, partly resulting out of the opportunities refugee camps afford to terrorists and their sponsors.

Not only do massive refugee camps foster alienation and radicalization and create tensions between refugees and their host countries, they can also become hotspots for conflicts that swell into broader regional conflicts, with serious geopolitical consequences. The conditions of the Nahr Al-Bared camp allowed it to be hijacked by terrorists, creating a war on an American ally’s soil. Since 2007, the United States has spent hundreds of million of dollars to help stabilize Lebanon. The costs of refugee camps are greater than the cost of providing housing and food.

The conflict of Nahr Al-Bared demonstrates what can happen when a refugee camp is allowed to grow into an established anarchic slum. When the Lebanese camp was founded, it was intended to be a short-term solution. Instead, it became a permanent and dangerous reminder of what can happen when a refugee crisis is never really resolved.

When considering the current refugee crisis, policymakers must remember that refugee camps are not as cheap as they seem, and may create the very dangers they are trying to avoid. Politicians who want to keep Syrian refugees off American soil may describe refugee camps as “really quite nice,” but they’re really quite awful, and  potentially pose great risks.  

Consider what could happen if ISIS were to use camps in Turkey or Jordan to destabilize those countries. The camps are powder kegs of regional, religious, and ethnic tensions, and an outbreak of conflict in any of them could spread disorder, create more refugees, and embroil the United States in new wars.

There are no easy solutions the refugee crisis. Resettling refugees in new countries poses a different set of problems and risks. But relying too heavily on large camps to absorb refugees could create new dangers and lead to tomorrow’s intractable conflicts.

This post was originally published on Medium