Fox News commentator Tucker Carlson gained notoriety for ranting recently that “the Democratic Party is trying to replace the current electorate of voters now casting ballots with new people, more obedient voters from the Third World.” “That’s not democracy,” he told his viewers. “It’s cheating.” As Frank Bruni of the New York Times noted, Carlson’s tirade “became its own news story, making him more of an actor in our national drama than a chronicler of it.”

We’ve been here before. Starting in the 1830s, amid a wave of Irish Catholic immigration, Protestant nativists — including newspaper editors, the pundits of their day — issued similar warnings. New citizens, they claimed, would blindly follow religious or political leaders, rather than casting ballots as properly independent thinkers. Their efforts did little to reduce immigration, especially once the Great Hunger forced more than 1 million people to leave Ireland for the United States to avoid starvation. But their xenophobia sparked deadly riots and political polarization, leaving a legacy of distrust that would take decades to heal.

The nation’s first great nativist troll was Samuel F.B. Morse. Best known for his invention of the magnetic telegraph, Morse spent much of the 1830s railing against Catholics. Although his political career ended in a dismal fourth-place showing in a New York City mayoral race, he helped inspire a nativist movement that stretched from Boston to New Orleans. As the economy slipped into a depression after 1837, native-born workers found it all the more appealing to blame immigrants for their problems.

Antebellum nativists repeated a few core arguments that will sound familiar to 21st-century readers. They disparaged immigrants as “foreign paupers, and the refuse population of Europe,” who would make the United States “the general alms house of Europe.” They warned that men hungry for work would drive down wages for the native-born. They accused Irish immigrants of violence, drunkenness and criminality.

In the most striking foreshadowing of Carlson’s tirade, nativists charged that newly naturalized citizens, even after five years’ residence, were incapable of independent thought and would resort to bloc voting. As a Philadelphia editor put it, “We find foreign citizens — or if they like the phrase better — adopted citizens, moving in a solid mass to the aid of this or that party, as their passions or their interests direct them, and alike courted by both.” Worse still, the nativists claimed, some unnaturalized immigrants voted illegally. They warned of “alarming inroads that have been made and that now threaten the foundation of our republican form of government, by the frequent and outrageous frauds committed at the various elections by foreigners, through the instrumentality of truckling and corrupt politicians with the ballot box.”

These charges had some kernels of truth. Many Irish immigrants were poor, violent, drunk or politically unsophisticated. So were many immigrants from other countries. Yet, so were many native-born Americans. When given the chance, nativists were just as ready to demand straight-ticket votes, to brawl at polling places, to stuff ballot boxes and to reward their followers with patronage jobs. The immigrants who did the same simply showed their understanding of American politics. And when it served them, immigrants knew to shift their votes, lest one party take them too much for granted.

Nativism was successful, at least for a time. Starting from scratch in the mid-1830s, the nativists by 1844 built sizable third parties in some cities. A nativist won election as mayor of New York City, and Philadelphia nativists rapidly coalesced into a strong political force.

But this success came at a terrible price. In Philadelphia in 1844, nativist mobs stormed through Irish Catholic neighborhoods and attacked Catholic churches, burning two and ransacking a third. Even as the riots raged, nativist leaders inflamed passions by warning of foreign-born voters and pledging “to rescue the Ballot Box from fraud, and restore purity to the Elective Franchise.” Only the intervention of the volunteer militia stopped the violence, at the cost of about two dozen lives. The nativist leadership may have welcomed the bloodshed, for they pointed to the violence as proof of the dangers of immigration. In the election following the riots, they beat out the more established Democrats and Whigs to win three seats in Congress and many local offices.

In the late 1840s, that first nativist movement declined, but it reemerged in the 1850s as the American Party, or Know-Nothings, again winning seats in Congress and running former president Millard Fillmore as its presidential candidate in 1856. Again, nativist fury sparked violence against immigrant voters. A Know-Nothing newspaper in Louisville framed the problem in both religious and political terms, accusing Catholics of owing allegiance only to “the Pope of Rome, an inflated Italian despot who keeps people kissing his toes all day.” On Election Day in 1855, Know-Nothing officials in Louisville impeded voting in immigrant wards, then torched a German brewery and threatened a Catholic church. At least a dozen people perished in the violence. “For a year past,” a Catholic archbishop wrote, “I have felt that we ought to be prepared for martyrdom.”

By the late 1850s, the sectional crisis over slavery eclipsed immigration, and most nativists joined the new Republican Party, along with more tolerant leaders such as Abraham Lincoln. But in their years in power, they had turned immigrants — especially the Irish — into loyal Democrats, a pattern that would persist well into the 20th century. By disparaging immigrants as incapable of making independent choices, the nativists had forced them into straight-ticket voting.

The nativists of the 19th century were correct in their core prediction: The nation’s demographics did change. Catholicism is now the largest religious denomination in the United States, home to about a quarter of the population. Descendants of Irish Catholic immigrants — including President Biden — occupy positions of power. Seen solely through the lenses of religion and ethnicity, the immigrants have, to an extent, replaced the descendants of the families that fought the American Revolution.

But demography is not political destiny. A century after the Republican Party’s founding, Catholic “white ethnics,” especially Irish, Polish and Italian Americans, began gravitating toward the Republican Party, partly the result of courtship from Richard M. Nixon and, later, Ronald Reagan. Like other Americans, descendants of immigrants listen to religious and political leaders but vote their interests and their consciences. And if one political party treats them with respect, while another whines (as did Carlson in 2018) that “this is more change than human beings are designed to digest,” the former has earned their vote. That’s not cheating. It’s democracy.