Here are two ugly documents. In his 1882 cartoon, “What Shall We Do With Our Boys,” George Keller renders a Chinese laborer as an obscenely productive octopus, each arm busy at a task. Shut out of the workplace while the “coolie” does all the work, white boys—looking small and vulnerable—loiter on the sidewalk. A policeman arrests one, whose idleness seems to have driven him to mischief.

Then, the day after white miners killed 28 Chinese workers at a coal mine in Rock Springs, Wyoming, an editorial in the company-town newspaper reported that the “hated Chinese” had returned to town, guarded by soldiers, only to dig up “a large amount of money” from the ruins of their burned-down houses. Not content with the havoc wrought on the Chinese community on Sept. 2, 1885, the editorialist warned: “All the white miners in Rock Springs, except those absolutely required, are to be replaced by Chinese labor. … Rock Springs is killed, as far as white men are concerned, if such a program is carried out.”

These are relics of the racism that drove the creation of Chinese exclusion laws in the late 19th century. In her book The Chinese Must Go: Violence, Exclusion, and the Making of the Alien in America, Beth Lew-Williams, a historian at Princeton University, tells the story of the social consensus that birthed those laws, in bare and unsparing prose. The Chinese Must Go shows how a country that was moving, in a piecemeal and halting fashion, toward an expansion of citizenship for formerly enslaved people and Native Americans, came to deny other classes of people the right to naturalize altogether. Chinese exclusion created the idea of the inassimilable alien, Lew-Williams argues, and that concept still hurts Americans today.

In the 1860s and 1870s, Chinese migrants had frequent contact with white Americans, in workplaces and in communities. Their residences, Lew-Williams argues, were not as spatially segregated as you might expect if you think only in terms of “that icon of Chinese spatial and cultural ghettoization,” the classic “Chinatown.” In Seattle in 1880, for example, 84 percent of Chinese residents had non-Chinese neighbors. “This frequent contact across the color line did not prevent anti-Chinese advocates from believing that the ‘Chinaman’ fell outside their imagined American community,” Lew-Williams writes. “To do so, however, meant unseeing social reality.”

This persecuted class of nonwhite immigrants, the logic went, had been shown to be inherently inassimilable, and should not be allowed in.

The violence that groups of white people directed against Chinese migrants in the West—the deaths of the miners at Rock Springs; the forcible expulsion of the entire Chinese community in Tacoma, Washington, on Nov. 3, 1885; the many other acts of murder and property destruction—was racist, of course. But it was also integral to the passage of the laws that the government created to keep Chinese migrants out. Lew-Williams speaks often of “scales”—the idea that a person’s actions could be local (violence against neighbors), national (political arguments about immigration), or transnational (choices made about trade and treaties), and that actions taken in each of those contexts could have ripple effects on events taking place as close as next door, or as far away as around the globe. While that concept can feel academic, it’s also revelatory, showing how local acts of racial violence and the government’s passage of laws of exclusion were intertwined, even at a time when communication and transportation moved at a slower pace.

Anti-Chinese agitators often cited the government’s inability to enforce existing immigration laws as a way of justifying their acts. Lawmakers, in turn, referred to past and future acts of violence in making supposedly humanitarian arguments for exclusion. This persecuted class of nonwhite immigrants, the logic went, had been shown to be inherently inassimilable, and should not be allowed in. It was, after all, for their own good; the government could not protect them.

But the exclusion laws didn’t end anti-Chinese racism. After the passage of the 1882 Chinese Exclusion Act; its more draconian 1892 extension, the Geary Act; and the government’s victory in the Supreme Court case of Fong Yue Ting v. U.S. (1893), Chinese migrants could be stopped anywhere in the United States and asked to prove their residence. The government could expel and deport Chinese who failed to produce papers. This was the law—in theory. Lew-Williams finds that the government had difficulty enforcing it in practice, because deportation wasn’t cheap. Citizens stepped into the breach. The Labor Council of San Francisco recommended that union members “ascertain the names and addresses of every unregistered Chinaman living or working in your vicinity.” Citizen surveillance would help the officials struggling to enforce the law. This system was “laborious and expensive,” Lew-Williams writes, yet resulted in the jailing of at least 64 Chinese people in the city.

The stories of racist violence and community shunning are brutal to read. Lew-Williams particularly excels at invoking the psychological effects of the law on Chinese people living in the United States after the exclusion acts passed. “It is vital to recognize the men and women who died as a result of anti-Chinese violence in the U.S. West,” Lew-Williams writes, “but we must also remember those who experienced the far more common outcome: precarious survival.” Many Chinese migrants, Lew-Williams observes, did not leave the states altogether; instead, they went underground.

Expulsion from existing communities, often at the hands of violent whites, caused “a moment of rupture” in the lives of migrants. Lew-Williams describes the “intangible casualties” that accompanied the more obvious losses of property and family members: “A sense of security, the familiarity of routine, and the confidence that came with community. In short, they suffered losses of life, liberty, and happiness.” Chinese migrants from Guangdong province (where most 19th-century Chinese immigrants to the states originated) believed that they needed to be buried in their homeland to avoid becoming a “wandering ghost,” “unfed, unclothed, and unable to bring good fortune to their descendants.” The deaths of Chinese migrants in the massacres of the 1880s “fueled fears of destroyed or forgotten bones,” and a feeling of everyday rootlessness drove that point home.

Lew-Williams argues that isolation and segregation were the lot of Chinese migrants who remained in the states through the early 20th century. They got the message of exclusion, loud and clear. Lew-Williams quotes a poem by Huang Zunxian, a Chinese consul-general who served in San Francisco from 1882 to 1885, during the worst of the anti-Chinese violence: “Men are no longer regarded as men [here]/ mauled like a subhuman species/ In this vast and desolate world/ Where can they find a foothold?” After exclusion, Chinese migrants, no longer trusting their white neighbors, “fashioned alternative ways to save and send money, print and disseminate information, produce and administer medicine, open and maintain businesses, and punish criminals.”

If I could want anything more from this satisfying, mournful, intensely written book, it might be a stronger connection between this history of exclusion and our present troubles. Invoking the words of Sen. Samuel Pomeroy, R-Kansas, spoken during an 1870 debate over naturalization rights of foreign-born emancipated slaves—“If you deny citizenship to a large class, you have a dangerous element, you have an element you can enslave; you have an element in the community you can proscribe”—Lew-Williams writes: “[Pomeroy] recognized that a permanent alien underclass would be in grave danger of abuse. Few heeded his warning.”

I am not in favor of requiring historians to tack a chapter onto the end of their books that explains how their work relates to the present day. These chapters always feel rushed and rarely wear well. Besides, I prefer genealogies to historical parallels, wherever possible. Yet, reading this book in 2018, I want something more than Lew-Williams’ final sentences: “While the American concept of citizenship represented an unrealized dream of equality, the legal structures of alienage contained the persistent threat of tyranny. Despite the dramatic events of the intervening century, these fundamentals continue to define America today.”

The Trump administration’s recent announcement that it will seek to include a question about citizenship on the 2020 census shows that power is still finding ways to profit from alienage, leveraging undocumented immigrants’ fears of exposure to advance its own agenda. Why didn’t any of the intervening immigration reforms manage to patch this vulnerability in our system? Over the years, has the lesson of the era of Chinese exclusion changed anyone’s mind about how things should and should not be done? If the answer is no, then why not? Filling in those blanks is probably beyond the purview of The Chinese Must Go, but this book is so good I want Lew-Williams to be the one to tell me more.

The Chinese Must Go by Beth Lew-Williams. Harvard University Press.

Read the rest of the pieces in the Slate Book Review.