From the Trojan Wall to Hadrian's Wall to the Great Wall of China to the Servian Wall, walls are pretty good at keeping people out as well as in.

A common refrain from those opposed to President Trump’s proposed border wall––including from Speaker of the House Nancy Pelosi––is that walls don’t work. The argument is that people find a way above, below, or even through the wall.

History tells a different story, however. The oldest walls, those at the site of Jericho in the West Bank, date back to 8,000 BCE, and sources suggest at least one purpose was to defend the city from invaders. Even in these ancient times the walls seemed effective, so much so that the Book of Joshua tells how the Israelites were only able to destroy the walls by walking around it with the legendary Ark of the Covenant for seven days!

The walls didn’t ultimately spare Jericho, but clearly they did impede attempts to take the city. In fact, only after they came down was the city destroyed. Protection like this has always been the purpose of walls.

No wall is truly indestructible, and walls alone don’t stop invaders, but ask the classical Greeks, Persians, or Romans why their mighty cities had walls. It was to keep enemies out and, in some cases, walls were so effective that it took deception to breach them.

This was the case of Troy, at least according to Homeric tradition, which likely does contain historical fact intermixed with elements of fiction. It is known that the city of Troy did exist and that its walls were effective in keeping hostile forces from pillaging the city. In Homer’s tale, the Trojan walls were so strong that the Greeks had to restore to trickery with the wooden horse and soldiers hidden inside to take the city.

That should serve as a warning that even if a border wall is erected along the southern border illegal immigrants, drugs, and other items will likely still manage to get through — if not via Trojan Horse, via hidden compartments and other methods of subterfuge.

The Roman Walls

During the Classical Era, no one built walls quite like the Romans. From the first Servian Walls to the later Aurelian Walls, the Eternal City was protected from barbarians and other threats by its walls––many of which continue to stand to this day!

Of course, Rome was ransacked, and more than once, proving that walls alone aren’t enough to stop an invading threat. A trained force on the perimeter is necessary to ensure security. Here is where President Trump and the Democrat-controlled House need to work on an overall strategy of border security.

The Romans again serve as a good model, with their frontier fortifications that included Hadrian’s Wall in the north of England and the Limes Germanicus along the German frontier of the Empire. These weren’t just walls or forts, but had small garrisons stationed along the frontiers. Now, no one is suggesting that the U.S. military or even Customs and Border Protection need to set up some outposts, but clearly a wall needs to be patrolled to be effective.

This is why, halfway around the world, China’s Great Wall was only marginally effective. It did stop invaders, but Genghis Khan, founder of the Mongol Empire, successfully breached the wall and easily conquered China. And here is a lesson that President Trump and other supporters of the wall need to heed.

China’s flat terrain offered no protection from invaders once the wall was breached. Apart from the Rio Grande in Texas, a border wall would be the first and last line of defense. Thus, a strategy that includes better patrols along any wall should be considered.

However, it should be remembered that in a 2,700-year history, the Mongols were the only ones to truly breach the wall with such success, and Hadrian’s Wall saved Roman Briton from invaders for 200 years! Even the subsequent peoples of the British Isles saw the effectiveness in walls that by the 14th century virtually every population center had some form of defense.

This was true across Europe with such major cities as Paris, Toledo, and Dubrovnik, Croatia (where HBO’s “Game of Thrones” is filmed) all building massive walls. Nowhere is this more notable than the French city of Carcassonne, where walls from the Roman as well as the Middle Ages still stand. With a proper defense and trained forces, walls have proven effective for eons.

Walls In the Modern Era

If there is a counterpoint to walls, it is that in the modern era, walls have been less effective than their designers imagined. The French, fearing an invasion of Germany and expecting a replay of the horrors of World War I’s trench warfare, constructed the defensive Maginot Line along the country’s eastern border. However, the Germans invaded in 1940 and bypassed the line, proving that even a well thought out defense can be ineffective if an entire border isn’t secured.

The Germans learned a similar lesson with the West Wall, which were the defensive positions along the coast to stop an Allied invasion of Hitler’s so-called Fortress Europa. The D-Day landings in Normandy used deception (again subterfuge came into play), but another factor is that defending any line means defending all of it, while an attacker or invader can concentrate on one vulnerable point.

Yet even in era of jet aircraft, helicopters, and drones––where walls can simply be flown over––there are still plenty of examples of effective walls. The Berlin Wall wasn’t erected in August 1961 to keep people out, even if the East Germans did say it was to keep East Berlin safe. The point of the wall was to keep people in.

The 96-mile wall, which in essence circled West Berlin, began as little more than barbed wire, but by the 1970s had become several layers deep. That included 116 guard towers and 20 bunkers with hundreds of guards. Yet from 1961 to 1989, more than 5,000 people did successfully manage to cross the border into West Berlin.

A final consideration includes two examples noted recently by Fox News––one in Hungary and another in Israel. The former was built in 2015, when tens of thousands of foreign citizens from the Middle East made their way to Hungary from Serbia and Croatia. In response, border walls were erected. According to Hungarian Foreign Minister Peter Szijjarto, the number of illegal migrants has dropped to almost none.

In Israel, a wall in the West Bank was constructed as part of a counter-terrorism measure, while on the Gaza border a “smart fence” has been erected to prevent illegal migration from Africa. Both border installations include two layers of fencing with advanced surveillance equipment and have resulted in a 99 percent decrease in illegal border crossings.

Perhaps President Trump, Pelosi, and others in government need to take some lessons from history: walls and frontier security work, but it will take some determination and strategy. Unfortunately, it seems like the biggest impasse may just be in getting these two sides to come together.