A century and a half ago, as anti-Chinese diatribes circulated on the West Coast, a woodcut of Chinese immigrants getting inspected by customs officers appeared in an 1877 issue of Harper’s Weekly.Bettmann / Getty

If you want to know the roots of the “immigration invasion” rhetoric that President Donald Trump has championed time and again—and which was echoed in the racist manifesto linked to the man held for the mass shooting in El Paso, Texas, last weekend—you can find them in the anti-Chinese diatribes that circulated on the West Coast a century and a half ago.

“THE CHINESE INVASION! They Are Coming, 900,000 Strong.” On August 27, 1873, readers of the San Francisco Chronicle were greeted with these words, in a notice that demanded, “What are you going to do about it? Nations of the earth take warning.”

The notice appeared in advance of the publication of a book that repeated the alarmist language on its title page: The Chinese Invasion: Revealing the Habits, Manners, and Customs of the Chinese. The book would describe, as the subtitle explained, “the twenty-three years’ invasion of the Chinese in California and the establishment of a heathen Chinese despotism in San Francisco.” The author, Henry Josiah West, warned in the introduction that “the Chinese in California are the advance guard of numberless legions that will, if no check is applied, one day overthrow the present Republic of the United States.”

Trump has frequently used the word invasion to describe undocumented immigrants coming over the southern border. In June 2018, he tweeted about border crossers, “We cannot allow all of these people to invade our Country. When somebody comes in, we must immediately, with no Judges or Court Cases, bring them back from where they came.” He amped up his “invasion” talk that November, shortly before the midterm elections, as part of his scare tactics concerning the Central American “caravan.” “Some people call it an ‘invasion,’” Trump said at the time. “It’s like an invasion. They have violently overrun the Mexican border.” And just this week, The New York Times reported that more than 2,000 Facebook ads from Trump’s reelection campaign have amplified his message by using the word invasion.

The El Paso suspect is believed to have posted his screed online minutes before carrying out the shooting that left 22 dead and at least 26 others injured. In it, he called his attack “a response to the Hispanic invasion of Texas.” And while the El Paso manifesto seeks to absolve Trump from blame for the shooting, its language about an ongoing “invasion” from the south is distinctly Trumpian. It also mirrors the longer list of grievances from the white supremacist charged in the shooting attacks at mosques in Christchurch, New Zealand, in March. The New Zealand shooter wrote of wanting to “deport those invaders already living on our soil.”

The American brand of nativism has long relied on menacing images of immigrant invaders. The “invasion” trope has gone hand in hand with similar metaphors of contamination and infestation. (Trump has drawn on the rhetorical figure of “infestation” as well, as I explored recently.) Democrats, the president has said on Twitter, “want illegal immigrants, no matter how bad they may be, to pour into and infest our Country.” Since the El Paso shooting, Trump’s critics have pointed to such rhetoric as a contributing factor to mass killings. “Anyone who, as president, describes asylum seekers at the U.S.-Mexico border as an infestation or an invasion … sows the kind of fear, the kind of reaction that we saw in El Paso,” the former Representative Beto O’Rourke of Texas said on CBS News’s Face the Nation.

In California in the late 19th century, immigrant Chinese laborers bore the brunt of the “invasion” discourse. While the term historically had been used to refer to the incursion of armed forces, Chinese immigrants were seen as “invaders” of a more insidious kind. In 1876, three years after the publication of The Chinese Invasion, a San Francisco lawyer named H. N. Clement testified at a California state Senate committee hearing that “the Chinese are coming” in the form of an “unarmed invasion.” As Erika Lee, the director of the Immigration History Research Center at the University of Minnesota, has detailed, the “invasion” alarms in California ended up drawing national attention, leading to Congress passing the Chinese Exclusion Act of 1882, the first significant law ever to ban an entire national group from entering the country.

Even after Chinese immigration was restricted, the “invasion” metaphor did not die, but was instead simply transferred to different groups of foreigners. When immigrants from Japan, Korea, and India began arriving, “Californians portrayed the new immigration as yet another ‘Oriental invasion,’” Lee writes in her book, At America’s Gates: Chinese Immigration During the Exclusion Era, 1882–1943. And in the debates over extending restrictions to other nationalities, a new “invasion” was imagined as coming from southern and eastern Europe, with nativists decrying the “race suicide” that would result from the high birth rates of new European immigrants.

Mexican Americans, too, were targeted with the same “invasion” trope that had first been applied to those arriving from China. “These Mexican invaders like the United States,” wrote a 1928 editorialist in the Star-Gazette of Elmira, New York. “And they are moving here in such numbers that attention is being directed toward possible restrictive measures.” The editorial ends by posing the question, “Now, what are we to do about this Mexican invasion?”

The “immigration as invasion” metaphor would play out again and again in American political discourse. In his book Brown Tide Rising, Otto Santa Ana, a sociolinguist at UCLA’s Department of Chicana/o Studies, analyzed mass-media coverage of Latinos in California when debates over immigration heated up in the 1990s. He found that the “invasion” metaphor occurred frequently in news reports, such as when a supporter of Proposition 187, the 1994 ballot initiative that sought to curtail benefits for undocumented immigrants, told the Los Angeles Times, “People are saying, ‘I don’t like this Third World takeover.’ It is literally an invasion and very upsetting.” Now, 25 years later, the “invasion” rhetoric has once again been given a presidential seal of approval—and has taken a deadly turn.

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