Adam T. Smith is a professor of anthropology at Cornell University.

Donald Trump’s proposal to build a wall along the border between the United States and Mexico to block the flow of migrants has been justly criticized on moral, economic and political grounds. But while the Trump Wall (as he has called it) is the most provocative proposal of the election season, it is not particularly original. Over the past five millennia, politicians have repeatedly turned to large walls to solve problems. We should look carefully at the track record of this ancient technology before we invest what some estimates suggest could be $25 billion in construction costs for a 2,000-mile-long wall, plus millions more in annual maintenance.

One of the earliest examples of a large-scale barrier wall was constructed by the rulers of the city of Ur, in what is now southern Iraq, at the end of the third millennium B.C. The kings of Ur faced a considerable challenge along their northwestern border from a semi-nomadic people known as the Amorites. Cuneiform texts suggest that Amorites not only pressed in on grazing lands but also for decades had moved into the cities of southern Mesopotamia, where they were regularly identified as foreigners. During the 21st century B.C., the kings of Ur resolved to block further migration by building linear barriers, some of which may have extended as far as 155 miles. But the walls were spectacular failures. After decades of wall building, Ur’s kings were eclipsed and, for the next three centuries, Amorite kings ruled over much of Mesopotamia.

Hadrian’s Wall, initiated by the Roman emperor Hadrian in A.D. 122 across the northern boundary of the province of Britannia, was more successful, largely because it was never intended to cease the everyday flow of people across the border, as the Trump Wall seeks to do. Indeed, the wall became an important entrepôt for trade and a funnel for population movement. The strategic objectives of Hadrian’s 73-mile wall were to provide the military infrastructure for parrying violent attacks from the north and to define the symbolic limits of the Roman world.

But even military walls, with their more limited ambition, have an undistinguished track record. During the 6th century A.D., the Sassanian king Khosrau I erected a series of extraordinary walls at the city of Derbent, in what is today the southern Russian republic of Dagestan. Khosrau’s walls, thought at the time to be impregnable, were up to 60 feet high and stretched for 30 miles. And yet not even a century later, they were overrun during the third Perso-Turkic War.

The walls of Derbent illustrate the fundamental trouble with barriers. We imagine them to be impregnable, but they are in fact porous. They can always be circumvented (witness the Amorites) or simply overwhelmed (as at Derbent). What static barriers do provide is an illusion of security.

The porosity of walls is best illustrated by the most famous of all pre-modern barrier walls: the 5,500-mile-long Great Wall of China. The most significant portions of the Great Wall that remain standing today were built by the rulers of the Ming dynasty starting in the 14th century A.D. to check the advance of the Mongols. The emperors built early components of the Great Wall in areas of strategic military concern, much like Hadrian’s Wall. But Mongol armies proved remarkably adept at simply going around the barriers, necessitating new investments in still more walls. Ultimately, however, it was not the ease of circumventing walls that undid the Ming. In 1644, a former Ming general opened the gate of the critical Shanhai Pass, allowing the forces of the upstart Qing dynasty to pass through. Porous indeed.

What is most captivating about barrier walls, like the Trump Wall, is neither the scope of their construction nor the resoluteness of their strategic vision. Rather, they are powerful symbols of a particular kind of hubris, the conceit that the translation of mania into masonry can alter the decisions, fortunes and futures of countless others through architectural intimidation. Here, the Berlin Wall should still live in all of our memories as a potent symbol of how walls and totalitarian politics often find common cause. Barrier walls are not simply clumsy, imprecise solutions to problems of population movement, past and present; they also represent a catastrophic failure of political imagination endemic to totalitarian thinking.

The Trump Wall, the past shows, does not promise a solution to the forces driving migration along the U.S.-Mexico border. But it does offer the illusion of a solution. So if the Trump Wall is ever built, no one should be surprised when it is bypassed, breached or bombarded, just like those that came before it.