Now that the dust has settled on the 2018 midterms, we know that President Donald Trump’s effort to rally the Republican base by exploiting border insecurity didn’t work—neither his fearmongering about the migrant caravan, nor his claim that he would end birthright citizenship. The caravan, billed as an incoming “invasion” of immigrants from Central America, presented no credible security threat, a fact immediately evident to most observers. And birthright citizenship is protected by the Constitution and thus cannot be cancelled by the executive branch. For the first time in Trump’s presidency, the border failed to deliver.

The real crisis of border security is not a caravan of asylum seekers, but the total erosion of our values.

These facts are a source of some enthusiasm on the left, but we should be careful not to claim victory too soon. The border has been, and will continue to be, a source of division in the country—a fact made evident again last week by the use of tear gas at the San Ysidro crossing outside Tijuana. And while it is easy to criticize the veracity of Trump’s appeals, many of us remain anchored to the underlying logic of his claims—that, for example, the caravan would have been a threat if it were, say, larger. In other words, even if this particular instance is absurd, many Americans accept the essential premise of Trump’s claims: that migrants represent an existential threat; that the point of the border is to keep them out; that our citizenship policy should support these aims.

As a society, we have accepted as self-evident that a secure border protects our national sovereignty (and, by extension, citizens). But in fact, the opposite is increasingly true. New forms of bordering rely extensively on data and information sharing at levels heretofore unimagined. Much of our new border security enterprise actually cedes classic markers of sovereignty, and devalues citizenship—compromising the rights not merely of migrants, but of Americans too. Indeed, in many ways, border security policies are ending citizenship as we know it. To understand why this is true, we need to start by reconsidering what a border is. Only then can we appreciate how they are changing, and why this matters.

• • •

When we speak about borders, more often than not we refer to lines on the map. Actual borders are more complicated, but this captures the essential idea that Earth is divided between states, and states are separated by borders. We think of sovereignty in this way too: it connotes the territorial space over which a state has ultimate jurisdiction (i.e., within a bounded state container). When defined in this way, borders, sovereignty, and security go hand in hand. The state secures its borders to protect its sovereignty. This worldview, often referred to as Westphalian—borne of the treaty of Westphalia (1648) that ended the Thirty Years’ War—is so airtight, it seems impossible to challenge. Indeed, despite the promise of globalization and the mid-1990s euphoria over borderlessness, by and large this model remains unchanged. After 9/11, it further gained currency, as evidenced by the rise of border fences and walls worldwide.

We assume that states love borders, while in fact the opposite is often true. The stronger the state, the more likely the border is an impediment to law enforcement.

By and large, ours is still a Westphalian world. But over the past dozen years or so, a new consciousness has emerged within security communities, in the United States and globally, that walls are inadequate to secure a border. They are too easy to fly over, or tunnel under. And anyway, nearly all “illegal” migrants enter the country legally and choose to overstay their visa—a problem that no wall can solve, no matter how high or wide. Instead, to really make borders secure, a far more extensive system is needed, relying heavily on cooperation with (and help from) partners across the border. While researching for my book, The Politics of Borders: Sovereignty, Security, and the Citizen after 9/11, the border guards I interviewed spoke repeatedly of the need for “defense in depth”—that the border should be “the last line of defense,” not the first. By the time something is a threat at the border, it is already too late. The goal is to stop threats before they materialize. For this, you need to collaborate with your neighbors.

We usually assume that states love borders, while in fact the opposite is often true. The stronger the state, the more likely the border is an impediment to law enforcement (which would like to push past the border, not be hemmed in by it). New efforts at border security aim to “solve” the problem of the border, as much as secure it. The way to do this is through cross-border coordination, or “co-bordering.”

This new way of thinking was first piloted in 2005 with the Shiprider program, established along the U.S. northern border, which put Canadian police officers on U.S. ships in U.S. waters and vice versa. This allowed officials from both states to apprehend criminals in each others’ territory. This solves a problem familiar to viewers of old Westerns, where the rebels just have to make it to the county line so the sheriff can’t follow them.

The Shiprider pilot was deemed successful and similar programs have been instituted at the southern border as well, with U.S. and Mexican officials sharing information and conducting joint stings, including of the notorious tunnels that run under the border. Policies of cross-border collaboration are the new normal, with support at the highest levels of government. As one former chief of Border Patrol remarked: “[The goal is] to create a twenty-first century border . . . through information-sharing that has never occurred before. . . . The reality is, while securing the border is upfront and personal, you can’t do it alone.” A border patrol officer in the Tucson sector put it to me even more colorfully:

The concept of a twenty-first-century border is having a border zone, a thicker area, if you will—not just that delineated judicial line—where we could cross and patrol together. . . . It would be a dual-sovereign zone, almost like a Eurozone. . . . Every day [cooperation] is going on. . . . Is this collaboration perfect? No. But it is a far cry better than it was when I started in San Diego, when the only thing you would exchange were middle fingers.

Border policies such as these present an obvious challenge to sovereignty. Increasingly, borders are not mono-sovereign spaces, but overlapping areas of joint management and control. In this way, we are entering a new epoch of bordering. In the high Westphalian period of the seventeenth century, the border was the space where one state authority ended and another began, where two armies met face to face. By the eighteenth and nineteenth centuries, this purpose began to shift with the rise of interstate mobility: states used their borders to monitor the passage of peoples and goods, making sure that bandits were kept out and tax dodgers kept in. What we are seeing now is a whole new kind of bordering, such that borders are no longer places where states confront each other or manage mobilities, but rather where states align forces to confront mobilities. This change is hugely consequential. Rather than reveal contemporary security policies to be beneficial to sovereignty, they are actually parasitic on it. States are choosing to cede classic markers of sovereignty for the sake of security.

This strategy is rational from the state’s perspective, given that unwanted mobilities—immigrants, terrorists, drugs—threaten all states alike. But for the rest of us, this new approach to bordering is detrimental. It is obvious, of course, how a system designed to limit mobilities is bad for migrants and asylum seekers. But the significance of this move and the normative concerns it raises are not limited to migrants—they are bad for U.S. citizens, as well. This is due in large part to the other side of the border security coin, which is based on data.

• • •

An Arab American woman is more likely to be stopped on arrival at JFK than is a jet-setting Swiss banker because Arabness is a marker for risk, regardless of citizenship.

Thinking about the border as a thick, increasingly binational institution is an important corrective to the old “line in the sand” rubric. But arguably the more significant changes to bordering are taking place in the digital domain. Since border decision-making is only as good as the material it is based on, the sooner you can get information about incoming travelers, the better. But how do you learn about travelers before they arrive? The answer is data, in massive quantities, and a complex system of data sharing, the ramifications of which we are only beginning to understand.

The major push for data-based border security came immediately after the terrorist attacks of 9/11. Ports worldwide—air, land, and sea—began to overhaul their security systems, with new standards in place almost overnight to make sure that all travelers and goods were checked before they could proceed. (From the vantage of the present, it seems almost unimaginable, but even a few decades ago there was little security at airports, and what checks existed were conducted by the airlines.) Following 9/11, theatrical security procedures became commonplace at airports. These security measures were palliative to a still wary public. However, of themselves they did little to increase actual safety. Further, the economic cost—long queues, missed connections, procedural uncertainty—became too much to bear. We needed “smart borders,” such that our borders could be efficient and secure at the same time, allowing familiar goods and travelers through quickly, while unfamiliar ones could be maximally scrutinized. States worldwide began investing in high-tech port security and developing trusted traveler programs (such as Global Entry) which allow individuals to provide personal data in exchange for easy passage.

This evolution of port security can be described as the transition from “minimal checks for all” to “maximal checks for all” (immediately after 9/11), and finally to our present system of “checks for some more than others.” This final system has something of an Orwellian quality: these days, it would not be wrong to suggest that some travelers are more equal than others. Indeed, the point of data is to discriminate between travelers based on perceived risk. This should not sound benign. This brave new security world has major implications for both sovereignty and citizenship.

With regard to sovereignty, data sharing has created a security apparatus at our ports that is multinational. The challenge to sovereignty is immediate: decisions about entry and exit at our ports—the sine qua non of sovereignty—are increasingly based on data coming from heterogeneous and foreign sources. As one data expert explained to me in an interview, the problem of data sourcing is acute:

When we used to collect data from national sensors . . . a centrally run set of intelligence institutions [would do] quality control of the data, and then the data would feed the algorithms, which would feed the decision-making process. . . . [But] if we are not using centrally controlled and collected data any more, how are we addressing the data quality issue? [I] would argue that we don’t know how to do that yet. . . . Is the sampling random? Is the data intentionally biased? Maybe the government of China is feeding us data to mislead us. . . . [W]e need to develop the ability to detect bias in data, whether that be intentional bias, or simply misleading.

The system currently operates on a high degree of trust, which is itself completely antithetical to classical sovereignty. Certainly, the U.S. port official who decides whether to admit or refuse entry to a traveler is still acting on behalf of the state. But if that decision is predicated on non-sovereign, nonnational (and perhaps untrustworthy) data, then to what degree is it sovereign in any meaningful sense? The possibilities for massive data breaches are myriad—a pressing concern, especially after Russia’s involvement in the 2016 U.S. election. But this is a feature, not a bug—it is part of the very nature of data collaboration. If these measures make us more secure, they do so precisely by delegating sovereign authority, rather than safeguarding it.

But perhaps of greater interest is the effect this system has on citizenship. In the past, if you were a U.S. citizen, you could expect to be readmitted easily when you arrived at your own border. The state was something like home, a place you could feel you belonged. But this is increasingly no longer the case, as the logic of citizenship is being replaced by one of risk. It does not matter if you are an American; if you are deemed risky, you will likely be stopped. For example, an Arab American woman is more likely to be stopped on arrival at JFK than is a jet-setting Swiss banker, even though she is returning to her putative home. That is because Arabness is a marker for risk, regardless of citizenship.

The concern is not just what is happening at the border, but that a border-security logic increasingly permeates the nation as a whole.

Some aspects of this story are familiar. Certainly we have long doubted whether citizenship is race- and class-blind. But this bias—literally, discrimination—is now made formal in policy, such that there are data-differentiated scales of citizens. The highest position—the most mobile—is essentially stateless in that they are welcome wherever they go. This is not the “statelessness” that Hannah Arendt describes in The Origins of Totalitarianism (1951), but its opposite. In the present form, global travelers are stateless not because they have no state, but because they are not bound to any particular state. For this global few, the world is their state. Once one receives the global stamp of “acceptable,” mobility becomes a right. For those deemed suspect, it is at best a privilege. For whatever else can be said about states in the past, at least they protected their citizens. This appears to no longer be true.

In other words, the emphasis on risk changes the value structure embodied by the border. This shift is not controversial in Washington, but it raises considerable worries for citizens. Are we so ready to surrender the rights logic that we are “innocent until proven guilty” for the security logic that we are “risky until proven safe”? The issue is not just that we now have a data discrimination calculus at the border, but that a border-security logic increasingly permeates the nation as a whole. We see this with the expansion of ICE, which can abrogate constitutional protections—notably search and seizure—within a hundred mile radius from the border (which, because that includes the coasts, is a jurisdiction so large it includes two-thirds of the U.S. population). Discriminatory practices in this zone are commonplace, including against citizens, even if the political rhetoric makes it seem as though it only targets aliens.

We should also be concerned about how the state’s immense data power may be used in the future. Advanced forms of data analysis can predict future behavior based on profile propensities, a practice known as predictive analytics. Perhaps we are willing to tolerate this at the border—after all, stopping terrorism by definition means predicting harm before it occurs. But what about on U.S. soil? What about for other kinds of offenses? This is not some distant dystopia: predictive analytics are already being used by police departments in major urban centers, notably in Chicago. This data, unsurprisingly, tends to target poor and black neighborhoods, with young black men having reported cases where police knocked on their doors to warn them off doing things the police believed they were about to do—in effect persecuting them for precrimes, to borrow Philip K. Dick’s term.

The road forward is very much uncharted. It is hard to look to other democracies for guidance. The closest parallel to the path we are navigating appears to be China, with its brand of “digital authoritarianism”—in particular its program of linking the ability to enjoy the rights of citizenship to how well one performs on a social credit score (the system is still being beta tested, with full implementation expected in 2020). In China, an individual might, for example, have his or her rights downgraded for purchasing too much alcohol—an action not unto itself illegal, but which is thought to signal deficiencies of character. China’s social credit score also sharply penalizes acts of democratic dissent as mild as social media postings deemed critical of the state. Such a fully monitored society still feels unimaginable in the United States, but perhaps it shouldn’t. Our own policies of using data to classify citizens and determine the character and extent of their civil liberties is more a difference of degree than kind. Certainly both China and the United States are slipping down the same slope.

There is no reason to think this process will reverse. For the state, the ultimate goal of data accumulation is to possess a full portrait of every individual. In the intelligence community, this is referred to as the “person-centric” view of security. The goal is no longer simply to authenticate a person’s identity, but to paint a portrait of his or her trustworthiness. This raises grave civil liberty concerns, but also means we live in a world in which citizenship no longer possesses prima facie value. Indeed, from a security perspective, citizenship is antithetical to risk management. Given our security-obsessed times, it is hard to see how this trend can be reversed and the principles undergirding citizenship reclaimed. Data has no national sympathies, and increasingly neither do we.

This is the real crisis of border security: not an imagined caravan of asylum seekers, who come poor and tired to our doorstep, but the total erosion of our values. The logic of border security is all-expansive and is subverting our most cherished democratic institutions. Some solutions present themselves: we need better protections against data encroachment and renewed commitments to the principles of citizenship—not to mention clear parameters for how data can be used against others, migrants included, in accordance with our commitments to human rights. But more than anything else, we need to have an expansive national debate about the relationship between states, citizens, and data. This starts with changing our discourse about borders. As long as we view borders as lines in the sand, it makes sense to fixate on medieval walls. But this will not help us tackle the twenty-first-century challenges we actually face.