In Casablanca, the ex-lovers Rick Blaine (Humphrey Bogart) and Ilsa Lund (Ingrid Bergman) reunite in the Moroccan port city where Ilsa and her husband, Victor Laszlo, have fled. Most people remember the movie as a story about love during wartime, and at first glance, it is: the pair ultimately renounce their love to help Laszlo, a Czech resistance leader, stick it to the Nazis. But the film’s entire plot—and, indeed, the very condition for Ilsa and Rick’s reunion—hinges on something much more mundane: Ilsa and Laszlo’s pursuit of travel documents. The papers themselves aren’t much to look at—just two folded sheets marked with an official’s signature—but in the film, as in real life, they can make the difference between life and death.

In the first half of the twentieth century, particularly during wars, many travelers in the West needed exit visas granting them the right to leave their country. And during World War II, Morocco, which was still a French protectorate when the movie takes place, became a stop on the refugee trail out of occupied Europe. Migrants traveled “from Paris to Marseille across the Mediterranean to Oran, then by train, or auto, or foot, across the rim of Africa to Casablanca,” the film’s narrator explains. There, they’d bribe an official, buy papers on the black market, or find some other way to procure exit documents, and wait for the next boat or plane to freedom. “The fortunate ones, through money, or influence, or luck, might obtain exit visas and scurry to Lisbon, and from Lisbon to the New World,” adds the narrator in an early scene. “But the others wait in Casablanca… and wait… and wait… and wait.” Rick’s Café is the gin joint where these characters congregated, commiserated, and languished: a veritable United Nations of champagne cocktails and gambling.

Casablanca is more than seventy-five years old. If released today, it would surely be criticized for its moralizing American nationalism, as well as for celebrating French colonial rule without featuring a single Moroccan protagonist. Read as a migration narrative, however, Casablanca reminds us that the identification papers we carry were created not to give us freedom but rather to curtail it. The right to mobility is granted not by the individual but by the state, and access to that right is dictated largely along class lines. The poor, unwanted abroad and unable to pay for the required visas, transit costs, and even basic documentation, stay trapped, while the rich can come and go as they please. In 2016, a record 82,000 millionaires moved to a new country thanks to immigration policies designed to attract the ultrarich, essentially by selling citizenship and residence permits. That year also, populist politicians around the world, from Austria to the Philippines, won over large numbers of voters by promising to keep the riff-raff out.

Passports, in other words, were invented not to let us roam freely, but to keep us in place—and in check. They represent the borders and boundaries countries draw around themselves, and the lines they draw around people, too. This is the case in wartime and in peace. While most countries no longer ask for Casablanca’s famous exit visas, all their elimination has done is remove a cudgel from the bureaucratic gauntlet. As barriers on people’s leaving fall away, blocks on their entering shoot up. And what is the use in leaving if you have nowhere to go?

If the passport served as a symbol of belonging to a sovereign nation, and, for the more fortunate, a way to travel outside it, not long from now the lines will be drawn around our bodies, rather than our countries. As printed papers and analogue technologies are giving way to intricate scans that can identify us by the patterns on our irises, the shape of our faces, and even maps of our veins and arteries, we no longer are our papers; rather, our papers become us.

The paradox of the passport is easy to forget in the West, since papers from North American and European countries grant citizens visa-free access, albeit temporarily, to almost anywhere they’d want to go. It’s not surprising, then, that when it comes to selling cars, credit cards, even mobile phone plans, the term “passport” is used as a stand-in for “freedom.” A German can visit 177 countries visa-free; an American, 173; an Afghan, just twenty-four.

Those of us who enjoy a degree of mobility only consider the converse—that without one, there is no way out—when the stakes are relatively low, if a passport is forgotten, lost, or misplaced. This trope is well-covered in the movies, too: the climax of Sex and the City 2 comes after Carrie Bradshaw leaves her passport at a shoe shop in Abu Dhabi; rushes to the souk with her friends to retrieve it; and, after scandalizing a throng of angry Arab men, is rescued by Emirati housewives dressed, beneath their abhayas, in haute couture.

The stakes for Carrie Bradshaw are pathetically trivial; she’ll have to rebook her trip, maybe fly coach, or spend an extra day dressed in conservative clothing. But the rest of the world’s predicament is closer to that of Ilsa Lund and Victor Laszlo—and without even their wealth and connections. Consider the persecuted, stateless Rohingya minority in Myanmar, or the millions of Syrians still living through a brutal civil war. They don’t have documents; or if they do, they don’t have the right kind. They can’t seem to get their hands on the papers they need to safely get where they’re going, so they resort to arduous, dangerous journeys over land and water. And if they don’t obtain a passport, a visa, or a document guaranteeing them safe passage, they face a long, long wait, the possibility of arrest, and, often, of death.

*

The adoption and standardization of travel documents on an international scale has as much to do with technology as it does with geopolitics. Until there were ways to move quickly over land and sea, it was easier to keep people in with walls, moats, fences, or coercion. But as transportation sped up and countries or empires became more interconnected by trade and by war, controls on the movement of people increased, too. It’s hard to know exactly who the first “passport” holder was, and where his or her document was issued, but according to John Torpey, a professor of sociology and history at CUNY’s Graduate Center and the author of The Invention of the Passport: Surveillance, Citizenship and the State (2000), there’s evidence that early identity controls were internal—that is, within a country, province, or empire. Under feudalism in Europe and Russia, serfs were bound to their masters’ estates; in sixteenth-century Prussia, a police edict was issued to prevent “vagrants” from obtaining “passes” to move to new towns and cities. The ability to move was, as always, tied largely to one’s socio-economic status, though efforts were made to keep the most skilled laborers (and their taxes) at home. An aristocrat with flat feet would have a much easier time traveling than a conscripted pauper.

The institutionalization of passports by the state became significant around the time of the French Revolution. Torpey notes that French revolutionaries objected vehemently to a decree from Louis XVI forbidding his subjects from leaving France without the right documents. After the revolution, they debated whether free men should have to carry passports at all. Some were in favor of the measure, reasoning that it was important for cohesion and security; others insisted that “a revolution that commenced with the destruction of passports must insure a sufficient measure of freedom to travel, even in crisis.”

Those in favor of papers prevailed. Over the next hundred years, empires rose and fell, armies and navies went to war, and conscription forced young men to register to fight, leaving an identification paper trail in their wake. Guards monitored borders and checkpoints judiciously to keep out spies and enemy foreigners during periods of conflict; immigration policies like the 1924 US Immigration Act placed limits on migration based on an applicant’s country of birth. In the wake of World War I, supranational bureaucracies like the League of Nations (later, the United Nations) standardized an international regime of travel documents, visas, and permits. The use of these papers developed in tandem with the rise of the nation-state and the establishment of physical, policed land borders whose existence we take for granted today. In Torpey’s words:

Modern states have frequently denied their citizens the right freely to travel abroad, and the capacity of states to deny untrammeled travel is effected by those states’ control over the distribution of passports and related documents, which have become essential prerequisites for admission into many countries.

As wars drew and redrew national borders and populations were displaced, erased, and exchanged, documents came to define a person’s place in the world. Newly created states—such as Austria, Hungary, Yugoslavia, and Czechoslovakia—began to print their own unique passports; these were a nation-building exercise, a diplomatic necessity, and a citizen’s proof of membership rolled into one. Citizens of the former Yugoslavia still express nostalgia for their old red passports, with which “you could travel anywhere,” in the words of one ex-hitchhiker.

But not everyone fit neatly onto these new maps: trapped in the middle were the stateless, who had no country and no papers, and exiles or refugees fleeing home with the wrong documents. Casablanca features a young Bulgarian woman ready to trade sex for a visa; the novelist Vladimir Nabokov paid a bribe (“administered to the right rat at the right office”) to obtain an exit visa for himself and his wife to come to the US. Stripped of his Russian citizenship, he traveled on a refugee passport issued by the United Nations. He hated it, writing in his memoir Speak, Memory that it was a “very inferior document of a sickly green hue.” Many others were not so lucky.

*

Just as technology contributed to the physical bordering of the nation-state with fences, walls, and checkpoints, so, too, does it shape the identification documents people carried to show the world where they belonged. Hand-scrawled scraps with brief physical descriptions evolved in the early twentieth century to include photographs, fingerprints, heights, hair, and eye colors. In the UK, entire families used to pose together; hats, props, and sunglasses were even accepted in the images until the 1920s. The US told people to stop smiling for the camera in the 1960s; in the 1970s, color photos replaced black and white ones. Forgeries and favors became somewhat harder to pull off, too. It’s one thing to buy a signed paper from a crooked—or is it benevolent?—official willing to help you out. It’s another to pass yourself off as someone else entirely.

Today, the passport’s days are rumored to be numbered. Airline executives and government officials predict that as soon as 2022, international travel will be “a smooth, tokenless process,” free of IDs or boarding cards, relying entirely on iris scans and fingerprints taken in a split second and vetted by a gigantic database of traveler information. With the rise of these biometric technologies against the backdrop of the war on terror and the resurgence of ethnic nationalism, we’re seeing walls—physical, legal, and rhetorical ones—being thrown up at every step. Physical walls have a symbolic part in the populist imagination, dividing “natives” from “others,” and beefed-up border controls, surveillance, and tracking technology create boundaries just as concrete in effect that politicians can crow about. Less noticed are the lines being drawn around people, delineations that will potentially follow them around for life.

The more information our fingerprints or irises immediately link to—such as where we live, what our occupation is, who our parents are, whether we rely on welfare, or if we’ve ever committed a crime—the more grounds there are for a kind of algorithmic segregation. Thanks to durable digital technologies like the blockchain, records will become indelible, for better or for worse; our histories could come back to haunt us decades after the fact of an arrest, a bankruptcy, or a deportation. In Automating Inequality: How High-Tech Tools Profile, Police, and Punish the Poor (2018), the political scientist Virginia Eubanks writes that data-driven welfare administration in the US ended up being a disaster because the technologies it used “are not neutral.” Rather, she argues, “They are shaped by our nation’s fear of economic insecurity and hatred of the poor; they in turn shape the politics and experience of poverty.” The “invasive electronic scrutiny” of the poor will soon be the status quo for all Americans, she notes. Already, an obvious target of biometric tracking will be the subjects of Trump’s promised “extreme vetting”: foreigners, refugees, and immigrants.

When the first of the current administration’s travel bans was announced in January 2017—the one that separated families, marooned long-time residents, and sowed chaos in airport terminals around the world—it was unclear whether the restrictions on travelers from nine Muslim-majority countries would also apply to dual citizens and permanent residents in the US from those countries. This group is a privileged minority, to be sure, and by no means the most immediately afflicted by the ban, but it raised a fundamental question: What determines where any of us is from? Is it the color of our passport, or the color of our skin? Is it where we’re born, or where we’ve mostly lived? In less abstract terms, would an Iranian Swede or a French Somali be forever simply Iranian or Somali in the eyes of the US agencies that control immigration and borders?

There was already some precedent for the ban: in 2015, during the Obama administration, Congress had voted in a law that required anyone with links to a country considered a “security risk” (such as Iran, Iraq, Syria, or Sudan), regardless of who they are or where they live, to obtain additional visas to come to the US, rather than simply enter on their other passports. The law still stands. Trump’s more extreme version along similar lines was ultimately scaled back—it doesn’t affect dual citizens, after all, and is facing challenges in the courts—but it did hint that in the future, the borders we’re born into could be impossible to escape. Visa or entry approvals are currently determined by passport stamps, entry records, cities of birth disclosed on some (but not all) national IDs. With more robust datasets and technologies, there will be less discretion: the denials would happen as a matter of course.

This has legal and political consequences, but also personal ones. The collection of biographic, biometric, familial, and even genetic information creates digital legacies that are hard to shake. In China, a country that still requires documents for internal travel, iris scanners, motion sensors, and other sinister-seeming technologies monitor its Muslim Uighur minority constantly. Chinese citizens generally are evaluated for visas, mortgages, schools, and employment by social credit scores. When today’s refugees follow Casablanca’s refugee trail in reverse and travel from Africa, across the Mediterranean, and into Europe, the authorities collect their biometrics and follow the Dublin protocol, whereby a migrant’s first port of entry is where he or she must apply for asylum. It’s getting harder and harder to disappear and start over. So much for mobility, be it physical, economic, or social.

Drawing borders around people might give us a more orderly and predictable world. But for all the promised benefits of a frictionless experience of journeying, it may not be a more humane one. Passports could well disappear in the next decade, but they’ll be replaced by something much more invasive: a digital shadow representing our bodies, our families, and our pasts, following us like little rainclouds everywhere we go.