Since September 11, 2001, both the U.S. and Europe have merged anti-terrorism strategies with immigration policy, and with little success.

As the first news of yesterday’s brutal terror attacks on Paris broke, one of French president Francois Hollande’s first acts was to close the country’s borders. One must ask; is the intent to keep people in or out? And will either move really keep the people of France safe?

Certainly, if there is a monster loose inside your house, it makes sense to close your window and doors before it can escape. But in today’s world, monsters can’t really be kept out. Militant networks exist in both physical and virtual space. A man born in the U.K. becomes a suicide bomber in an Aleppo prison. Girls born in France run away become child brides to fundamentalist militants in distant wars. And millions and millions of people under attack from these same fundamentalists have fled Syria in search of safety. When attackers can be born and raised inside your house, simply closing your windows and doors cannot keep your family safe.

And who, exactly, is France’s family? A quick glance at a map of the most and least culturally diverse countries in the world, based on a 2013 University of Oldenberg study shows that France is one Europe’s most diverse countries. That same year, Swedish economists Niclas Bergren and Therese Nilsson published another study asking whether economic freedom fosters tolerance. The Washington Post’s Max Fischer, who presented the study’s original source data in this excellent map, wrote that “France appeared to be one of the least racially tolerant countries on the continent, with 22.7 percent saying they didn’t want a neighbor of another race.”

Since September 11, 2001, both the U.S. and Europe have merged anti-terrorism strategies with immigration policy, and with little success.

France is just one country struggling to define who does and does not belong to its nation in a world on the move. As Western European birthrates decline and its populations grow primarily through immigration, many countries with narrowly defined concepts of nationhood must adjust to their diverse realities. The central challenge to France–and many European nations in the wake of these terrible attacks, amid the ongoing migration and refugee crises gripping the region, is: does only your nation–only family–deserve to be safe? And will keeping people out of the country achieve this?

These questions are especially critical, given that Greece’s deputy minister in charge of policing confirmed to Reuters that the Syrian passport found next to one of the Paris attackers was registered to a refugee who entered Europe through the Greek Island Leros on October 2015. If anything, this new information shows that E.U. border control is doing exactly what it should and can do–collect accurate data at the point of entry so that it can confirm who entered and when within one day of an incident. It is unlikely that more stringent border control can do any more than this. What matters now is what we do with this information

Since September 11, 2001, both the U.S. and Europe have merged anti-terrorism strategies with immigration policy, and with little success. Increased surveillance of immigrant communities has failed to generate terror leads or cases. Increasingly elaborate detention and deportation systems have consumed more and more of their respective national budgets while disproportionately focusing on people who’ve broken minor rules, like running traffic lights. At the same time, both the U.S. and E.U. have actively tried to deter migration by allowing people to die in the attempt to enter. In 2014, before this year’s Mediterranean crisis, the International Organization for Migration (IOM) estimated that some 40,000 migrants have died in transit since 2000, a number experts caution is likely a third of the true death toll.

These policies are not only criminalizing minor rule breakers and contributing to a growing death toll of migrants and refugees in the oceans, mountains and deserts, they are not actually keeping anyone safe from terrorist attacks. In fact, not only has the so-called securitization of migration policies been ineffective, they’ve created problems we do not want: they have broken the trust between immigrant communities and their governments and contributed to a growing international humanitarian crisis of migrant deaths.

In a recent oped in Foreign Policy, U.S. Institute of Peace President Nancy Lindborg argued that investing in foreign aid rather than border security would be a far more effective approach to managing overwhelming migration. To take this a step further, I would argue that the global refugee crisis unleashed by the Syrian war should be addressed globally, including the first-line countries that have been receiving and responding to new refugees for many years before the crisis hit Europe. It is also likely that, in the wake of these attacks, an international coalition will pursue a ground war against ISIS.

This of course begs the very first question we started out with: will any of this prevent the kind of terrorist attacks that struck Paris? It is only natural to want to prevent even one terrorist from entering the country. But we now know that turning against immigrant communities and trying to prevent immigration has not worked in the past. It will not work in the future. As France mourns this devastating crisis and turns toward the future, we must urge caution against trying to solve this problem through border security.