In the aftermath of Donald J. Trump’s jaw-dropper of a pledge to bar all Muslims from entering the United Sates, critics (of whom there are many) have gravitated almost uniformly to the two most obvious historical parallels in modern memory.

For some, Trump’s plan to make America muslimefrei smacks decidedly of Nazism. Writing for the New York Daily News, Max Paul Friedman, a history professor at American University, argued that Trump’s mounting incitement against Muslim Americans — including his incendiary, oft-repeated and patently false claim that Muslims in Jersey City cheered as planes hit the Twin Towers on September 11 — finds alarming parallels in the 10-year buildup to the Holocaust. Before they could imagine a “final solution,” Friedman writes, “the Nazis had to come to power through elections by spreading fear, and promote anti-Semitism through incitement to make non-Jewish Germans turn on their Jewish neighbors.”

Others have invoked the example of Japanese internment to historicize Trump’s disposition scheme. Rep. Al Baldasaro, a state legislator in New Hampshire and ardent Trump supporter, was quick to embrace the analogy, though notably, he cites internment as a good policy precedent. “What he’s saying is no different than the situation during World War II, when we put the Japanese in camps,” he offered. “The people who attacked innocent people in Paris came through open borders. From a military mind standpoint, all Donald Trump is saying is to do what needs to be done until we get a handle on how to do background checks.”

While both analogies are compelling, we don’t need to look to the dystopian example of Nazism or to the dread specter of Japanese internment (which most Americans, Rep. Baldasaro excepted, believe must never happen again) for instruction. We need only look to America in 1917, when German Americans like Frederick Trump (The Donald’s grandfather) withstood two years of systemic violence and state-sponsored repression. In the aftermath of the Bolshevik Revolution, this intense anti-immigrant backlash shifted gradually to Italian and Eastern European residents.

All told, the period between 1917 and 1920 witnessed the most sweeping violation of civil liberties suffered by non-black Americans then or since. And it all started with a little harmless, hot rhetoric.

* * *

Prior to America’s involvement in World War I, German Americans enjoyed a relatively privileged place in the immigrant landscape — not as suspect as the Irish or Jews, seemingly “whiter” than southern and Eastern Europeans, and “better fit” for citizenship than Asian or Mexican newcomers. That reality changed overnight in 1917, as the popular cry for “100 Percent Americanism” gave rise to a pervasive anti-German backlash — a direct response to America’s declaration of war against the Central Powers. For over a century, German Americans (including Frederick Muhlenberg, the first speaker of the House of Representatives) had thrived and prospered in the United States. Now, they were widely regarded as suspect.

Long before GOP congressmen re-dubbed French fries as “Freedom Fries,” Americans in 1917 designated hamburgers “liberty sandwiches,” and sauerkraut “liberty cabbage.”

In Iowa, a gubernatorial directive barred residents from speaking German on public conveyances, in public spaces or on the telephone, while in Wisconsin, a man who declared “Hoch der Kaiser” was nearly lynched before he consented to kneel and kiss an American flag. In Missouri, Robert Prager, a German-born miner, wasn’t so fortunate. Though he tried and failed to join the U.S. Navy, the good citizens of St. Louis regarded Prager as an enemy menace. A mob of “100 Percenters,” several hundred strong, stripped the young man naked, wrapped him in the flag, forcibly paraded him through the streets and hung him. A jury acquitted the mob leaders in less than 25 five minutes. (“Well, I guess nobody can say we aren’t loyal now,” one of the jurors bellowed.) The Washington Post lamented “excesses such as lynching,” but, on balance, considered the incident evidence of a “healthful and wholesome awakening in the interior of the country.”

Jingoism and suspicion gave rise to organizations like the Boy Spies of America, who infiltrated (or claimed to infiltrate) German communities in search of foreign agents and saboteurs, while national leaders of the Red Cross warned that German Americans were conspiring to place ground glass into bandages.

The federal government also put skin in the game. Against a backdrop of war with Germany and Austria-Hungary, political upheaval in Russia and labor radicalism at home, many public officials feared the possibility of domestic sabotage or revolution. It was in many ways a perfect storm that made wholly different categories of Americans equally suspect. Germans were widely presumed to be loyal to the Kaiser; labor activists, many of whom were immigrants, were presumed to be under the thumb of Russian Bolsheviks. No one was to be trusted. By wide majorities, Congress passed the Espionage Act of 1917 and the Sedition Act of 1918 and thus criminalized a wide array of activities — notably, the freedoms of assembly and speech — that normally fell within the protections of the Constitution. Atty. Gen. Thomas Gregory spoke for many in Washington when he counseled enemies of the state to seek forgiveness of God, “for they need expect none from an outraged people and an avenging government.”

One thousand American citizens and residents, most of them Germans or members of left-wing organizations, were prosecuted under the two statutes for offenses as seemingly innocuous as producing anti-war films and broadsides or, in the case of Victor Berger, a Socialist congressman from Wisconsin, delivering an anti-war speech. “If you stopped to collect your thoughts,” rued the writer Max Eastman, “you could be arrested for illegal assembly.” An official at the Department of Justice noted approvingly that “it has been quite unnecessary to urge upon the United States Attorneys the importance of prosecuting vigorously, and there has been little difficulty in securing convictions from juries.”

In 1919, the U.S. Supreme Court validated this pervasive constriction of civil liberties. Writing for the majority in the case of Schenck v. United States, Justice Oliver Wendell Holmes Jr. ruled, “when a nation is at war many things that might be said in time of peace are such a hindrance to its effort that their utterance will not be endured.” Of course, it often mattered who was doing the uttering. When Charles Schenck, a German American and outspoken socialist, urged his fellow Philadelphians to resist the draft, it was enough under the terms of the Espionage Act to land him in jail.

* * *

By 1919, with the war over and the doughboys home, American fury shifted from Germans to anarchists, Communists and labor radicals. Here, the historical parallel is particularly instructive.

Then as now, the United States was the target of stateless terrorist organizations driven by extremist ideology. In this sense, the Red Scare — which began in April 1919, when dozens of mail bombs were intercepted before they could hit prominent government targets (sadly, one blew off the fingers of a maid who worked for former Sen. Thomas Hardwick of Georgia) — was grounded at least partly in real-world dangers. On June 2, bombs were detonated in eight different cities including Washington, D.C., where an explosive intended to take out Atty. Gen. A. Mitchell Palmer missed its human target but nearly struck the AG’s neighbors, Assistant Secretary of the Navy Franklin Roosevelt, and his wife, Eleanor. The following year, a massive bombing in New York City’s Financial District took 33 lives, injured 200 others, and obliterated the J.P. Morgan Building. Most of these terrorist acts were the work of uncoordinated radical groups with no relationship to each other, let alone to foreign governments.

Set against a string of crippling labor strikes involving roughly 4.5 million workers (over 20 percent of the country’s labor force) — from the police in Boston and steelworkers in Pennsylvania, to miners in Appalachia and dockworkers in Seattle — the attacks raised the specter of a well-coordinated assault on American lives and property. In reality, there was no discernible connection between the attacks and organized labor. But terrorists and union members often shared a common trait: foreign birth.

If the threat was a least partly real, the reaction was wildly excessive. The now-infamous Palmer Raids, which began on November 7, 1919, saw thousands of men and women — most of them immigrants from Eastern and Southern Europe, very few of them terrorists or even members of dangerous organizations — rounded up, jailed and on many occasions deported. Suspects were denied the right to counsel. They were deprived of sleep and food, paraded through the streets to the menacing cries of an angry populace, and roundly convicted in the popular press without charges or trials.

Ironically, before World War I, A. Mitchell Palmer had been an outspoken progressive. A champion of child labor laws, women’s suffrage, immigrant rights, labor unions and the League of Nations, Palmer embodied the Wilsonian spirit. But as Americans have come recently to appreciate, there was a dark side to Wilsonian progressivism. The president who went to war to “make the world safe for democracy” did much to erode it at home. As the progressive leader Amos Pinchot lamented, the president had placed “his enemies in office and his friends in jail.”

Wilson and Palmer each exemplified the steep toll that war mobilization imposed on progressivism. In their zeal to make Europe more free and just, they betrayed many of their deepest-held values.

* * *

The immediate legacy of the Wilson administration’s overreach during and after World War I was the Democratic Party’s decline in fortune between 1918 and 1932. The GOP’s ascendancy flowed from multiple sources, but in no small part, the disillusionment of Wilson’s base created an opening for the Warren Harding, Calvin Coolidge and Herbert Hoover. “All the radical or liberal friends of your anti-imperialist war policy were either intimidated or silenced,” explained the journalist George Creel. “The Department of Justice and the Post-Office were allowed to silence or intimidate them. There was no voice left to argue for your sort of peace.” To many of the president’s erstwhile supporters, it was no longer clear that there was a difference between the two parties.

In the long run, the years 1917 through 1920 stand as a reminder that, in times of foreign war and domestic danger, extremist political rhetoric can lead to vile results. Politicians who saw a saboteur in every German social hall or a terrorist behind every Yiddish or Italian storefront sign manufactured a combustible environment.

Donald Trump’s continued provocations — against Mexican Americans, whom he has described broadly as drug runners, gang members and criminals; against Muslim Americans, whom he has denounced as a Fifth Column; against all Muslims, everywhere, whom he has identified as an imminent threat to American life and property — are more than just the antics of a sometimes entertaining performer. They harken back to a moment in American history of which few people today are proud.

Josh Zeitz has taught American history and politics at Cambridge University and Princeton University and is the author of Lincoln’s Boys: John Hay, John Nicolay, and the War for Lincoln's Image. He is currently writing a book on the making of Lyndon Johnson’s Great Society. Follow him @joshuamzeitz.