The border barrier between San Diego and Tijuana, seen from the American sideAlexis Madrigal

Borders are an invention, and not even an especially old one. Predated by the printing press by a good 200 years, borders are constantly under revision. Even the zone of a border itself, the Supreme Court has held, extends far beyond the technical outline of a nation. Imagine a border as the human-made thing that it is, and it’s no longer surprising that it takes a multitude of forms: a line on a map, a fence, a bundle of legal agreements, a set of sensors, a room in an airport, a metaphor.

As Elia Zureik and Mark B. Salter explain in a book on policing, a controlled border creates the notion that domestic space is safe. Protecting “the border” safeguards the home, the family, and a way of life. This idea of safety is so potent that it has shut down the United States government.

But the border itself—the line on a map, or the gate at a crossing—isn’t what’s at issue; it’s the idea of the border, a membrane that defines a nation while maximizing its market power.

A wall does not make a border, or at least it hasn’t in Europe since roughly 1648, when the Treaty of Westphalia was negotiated. In previous eras of human civilization, walls were used to define territory, in part because there was not a complex legal regime hammered out over time to rely on. “Rather than being used as political boundaries, such constructions, including the Great Wall built in the Qin Empire, served more as defensive barriers, a basis for further expansion, and a platform for the control and regulation of the flow of goods and people,” writes the political scientist Manlio Graziano in What Is a Border? “The state borders with which we are familiar today have very different characteristics: They are measured, drawn on a map, marked on the ground, and have a legal significance generally recognized by all parties involved.”

In other words, walls used to generate borders, not the other way around. But according to Graziano, beginning in the 17th century, as capitalism began to take root across Europe, borders became the way of creating and enclosing a nation, and with it, a national market. “The subjects of the same prince had to be able to recognize each other, understand each other, and obey the same distinctive characteristics and the same laws. In short, they had to become—even if the word only appeared much later—a nation,” Graziano writes.

Border regions, as at the boundary between the Mexican state of Coahuila and the American state of Texas— which were once a unified political unit— might share a climate, an ecosystem, and a culture, but once a border was established, they could not share an economy.

Which is not to say they don’t have economic relationships. As the United States’ border with Mexico shows, there is a lot of money to be made at the boundary between two different national economies. The border acts as a membrane that keeps labor on one side cheap while consumers on the other retain the high incomes to buy incoming goods. Make a fridge in Tijuana, paying wages in pesos; truck it across the border to San Diego; and sell it for dollars—and you can make a lot of money. (Hence, the decades of the maquiladora system.) The same holds true for Chinese manufacturing and the ports of the West Coast; it’s just that the border zone is the largest body of water on Earth and it takes six weeks to cross in a boat longer than the Empire State Building is tall.

In Western countries, especially since 9/11, this market membrane has run smack into a competing desire to keep out some people, however that group of, as the Border Patrol puts it, “inadmissables” is defined.

In 2007, the British government put its policy like this: “The aim of border control is to sort traffic into legitimate and non-legitimate.” As the scholar Nick Vaughan-Williams points out, there are actually two goals in the United Kingdom’s (as in the United States’) border policy. “Rather than operating simply as a ‘barrier’ or obstacle in the physical sense of a wall, ‘the border at work’ here is one that seeks to enhance mobility, circulation, and flow,” Vaughan-Williams wrote.

To accomplish these two seemingly at-odds goals, the American answer has been to create a more sophisticated, technologized border, one that uses data to allow some people and goods to pass extra fast while slowing or repelling others. The more the border is hardened, the more urgent and complex the programs that allow some valuable people and goods to pass freely become. Hence, the War on Terror’s airport crackdown and watch lists also spawned the Global Entry program for frequent—and “trusted”—international travelers. A tightening southern border led to Free and Secure Trade, a special trucking program for “trusted” shippers, which wants to get as close to the ideal of frictionless border crossing as possible.

Because airports “deterritorialize the border,” as the scholars Zureik and Salter put it, spraying it over the whole country, this is where most Americans encounter its processes. Because those chunks of the border cannot be walled off, they reveal what a border really is: bureaucratic machinations and technological surveillance, databases of databases, systems that determine who gets to leave these borders and who has to get back on a plane and return to whence they came.

The border isn’t really a line around the country, but an agreement between the state and the people who want to enter it. And like many other agreements, its terms are increasingly automated and opaque. The people respect the terms less, too. No one knows for sure, but reports have indicated that 40 to 50 percent of people in the United States who are not technically supposed to be here arrived on a legal visa and just stuck around. And that number is increasing.

A wall might turn away some desperate people in Texas, but it’s the largely invisible electronic system that marks some people inside and outside the United States that forms the real battleground of immigration into the country. Between Tijuana and San Diego, huge barriers enclose a narrow swath between the technical border and the real insides of America. In some sections, there are guards everywhere, massive surveillance towers, and an invisible wall of sensors, which has never been precisely explained. Even so, life flows back and forth across the border. People have family on both sides. Spanish and English is spoken on both sides. Businesses serve customers north and south.

Where the border fence ends in eastern San Diego County (Alexis Madrigal)

Then there’s a spot in the far northeast corner of Tijuana where the wall that runs from the ocean stops right there in the hills. You can simply walk around the fence. Turn around and look, and there’s the bustling manufacturing valley of Tijuana on one side and a piece of San Diego County constantly patrolled by Border Patrol SUVs and officers on the other. Poor people in that neighborhood in Tijuana use the barrier as a convenient fourth wall of their home.

The Secure Fence Act of 2006, signed into law by George W. Bush, appropriated an initial $1.4 billion for this type of structure. At first, it seems ridiculous to have a wall that ends. But if the point is to shore up the idea of the border, rather than actually slow the circulations that the economy requires, then maybe a fence that exists only where people are likely to see it is the perfect solution.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.