Governments have tried a vast array of tools to fight terrorism: Mass arrests. Intrusive intelligence-gathering. Buying them off. Aggressive checkpoints. Economic development. Massive force.

How about just building a fence to keep terrorists out though? That’s Tunisia’s plan. The North African nation has been hit by a string of terror attacks. In March 19 people were killed at a museum in the capital, Tunis. Almost 40 were killed in June at a beach resort. Tunisian officials have told reporters that Islamist terrorists are being trained in Libya and then coming to Tunisia to conduct attacks, so Tunisia’s prime minister has announced the construction of a 100-mile-long wall along the country’s eastern border.

Will it work? Humans have been building defensive walls practically since the beginning of civilization, so there’s a decent amount of evidence to draw on. And it doesn’t look promising.

First, defensive walls often fail. One of the oldest walled cities known is Jericho, where, as his eponymous book in the Bible relates, Joshua conquered by using trumpets to demolish the fortifications. Whether or not the biblical account is strictly accurate—brass instruments aren’t usually useful as a demolition tool—the story sets a template. The ancient walls of Jerusalem? Little help stopping a succession of conquerors. Constantinople’s magnificent ring of fortifications? Not much defense against invading Ottomans. The world’s most famous defensive line, the Great Wall of China, slowed but failed to prevent the fall of the Ming Dynasty.

The most effective walls tend to share three characteristics. They’re in heavily peopled urban areas, they’re expensive, and they’re short. And as Andrew Schoenholtz, a visiting professor at Georgetown University, told NPR in 2007, they’re often more effective at keeping people in than keeping them out. Take the gold standard of walls: the Berlin Wall. While the full wall was almost 100 miles, the inner-city barrier was only about 26 miles. The wall’s success depended on heavy militarization and the willingness of guards to shoot and kill hundreds of people trying to escape. Even then it was hardly perfect, and while estimates vary, perhaps tens of thousands of people escaped East Germany by various means.