Go after the media for dissing the president? Check.

Define treason as anything anti-administration? Check.

Restrict immigration? Check.

Make deportations easier? Check.

Tighten citizenship requirements? Check.

It’s the 220th anniversary of the Alien & Sedition Acts of 1798, the forebear of Trump’s anti-immigrant, media-bashing, attention-distracting rulings. Those Acts ramped up the American populace’s anger and directed it away from a tepid economy and ingrained elitism and toward the government’s homeland political enemies.

Congress passed the four Acts during the “Quasi-War” with France, to protect America from French subversion that could aid and abet a rumored French invasion. President John Adams did not ask for the Acts, but he deliberately signed the first one on July 14, 1798, anniversary of Bastille Day, to emphasize that the United States of America was taking action to counter an attempt to bribe American diplomats, and the seizing of American commercial ships, and France’s overt backing of Adams’ 1796 electoral opponent, Thomas Jefferson.

But there were no huge numbers of “aliens” in America to blame—except some Haitian émigrés who were black and free and just then a bit of a burden on Baltimore—and no real sedition. The true target of the Acts was the Democratic-Republican Party, and beyond that the First Amendment guarantees of freedom of speech and of the press. Adams’ Cabinet members, Secretary of State Timothy Pickering, Secretary of War James McHenry and Secretary of the Treasury Oliver Wolcott, Jr.—holdovers from the last phase of George Washington’s administration—pushed the application of the Acts and directed the subsequent implementation. Adams had kept the trio on to demonstrate continuity with Washington. Yet as Vice-President Thomas Jefferson wrote, “The Hamiltonians by whom [Adams] is surrounded are only a little less hostile to him than to me.”

The disloyal-to-Adams cabinet members were urged on by, if not directly controlled by, Alexander Hamilton. Three years earlier, Hamilton had resigned as secretary of the treasury so he could finally make some money, but in 1798 he was seizing the opportunity to become Washington’s second-in-command of the large army being raised to counter the threat of a French invasion.

In the 21st century, Hamilton, a notable immigrant, has been lionized as a champion of immigrants, and during the Revolutionary War period he was one, but not in the 1790s. For years he supported the work of John Fenno, in the Gazette of the United States, who did very little without Hamilton’s approval and who in editorials was regularly apoplectic about the problems brought to America by Irish, French, and Haitian immigrants. “My opinion is that the mass [of aliens] ought to be obliged to leave the country,” Hamilton wrote to Pickering when the A&S acts were being debated in Congress, although he did argue for “guarded exceptions” for a few whose “demeanour among us has been unexceptionable.” And when the Acts were signed into law, Hamilton supported them, as did George Washington.

That the Acts were really intended for retaliation against the Federalists’ political enemies was made clear by what happened after they became law. While the run-up to their enactment spurred the evacuation from the U.S. of a dozen boatloads of French émigrés, including a fair number of wealthy people, after the Acts were on the books the government did not expel even a single “alien.”

A month after their imposition, British Admiral Horatio Nelson destroyed the French fleet in the Battle of the Nile, ending any possibility of a French invasion of the U.S. in the coming decade.

Sedition prosecutions went ahead anyway. They swept up two-dozen newspapermen, among them Benjamin Franklin Bache, who had followed his grandfather into journalism and was the fire-breathing editor of the Aurora, which had been vicious to Adams and the Federalists; and James Thompson Callender, whose exposure of Hamilton’s affair and blackmailing had pushed Hamilton to publish a self-damaging pamphlet that all but ended his political career. Hamilton cheered on the prosecution of Callender.

That it was all about payback was made obvious by the most notable of the politicians indicted being Matthew Lyon, a Congressman from Vermont. Not long before, Lyon had spat in the face of a Federalist on the floor of the House, and later, when that worthy struck Lyon 20 times with a cane, Lyon had picked up nearby fireplace tongs and defended himself. He wasn’t indicted for that, but for various diatribes against the government and Adams, including those in his own newspaper, The Scourge of Aristocracy. In one famous passage, he accused Adams of an “unbounded thirst for ridiculous pomp, foolish adulation, and selfish avarice.” Far worse had been said about Adams, and about Jefferson too, by other publications during the ’96 election.

Lyon won re-election to Congress from his jail cell. Bache died in prison from yellow fever. Callender remained in jail until Jefferson won the election of 1800. Jefferson pardoned him, and three of the Acts expired as Jefferson took office in 1801.

The Acts did a great deal of harm: to other countries’ views of our country, to an American economy that sorely needed immigrants’ labor, skills, and capital, to the rule of law, to the Bill of Rights, and to Americans’ ability to trust one another. Politically, they hastened the end of the Federalist Era. Since the Constitutional Convention of 1787 the Federalists had been in charge, but because the A & S Acts were so draconian and had been so arbitrarily applied, they turned many voters away from the Federalists and into the arms of the Democratic-Republicans, who swept into power with Jefferson in 1801, and who would remain in control of the White House and the reins of the country until 1824.

Adams later regretted the Alien and Sedition Acts and blamed them on Hamilton, who before he died in his duel with Burr blamed them on Adams, whom he detested. They were neither Hamilton’s fault nor Adams’, but reflect badly on both men.

The fourth of the Acts was never repealed. It remained on the statute books and was trotted out and used during every national emergency through the long nineteenth century. During World War I it was updated and used to prosecute Germans in the U.S. There was some justification for that, as there had been a few acts of sabotage, but very little to justify the jailing of Eugene V. Debs, leader of the Socialist Party, for making a speech in 1918 that annoyed the authorities. At war’s end, the old Act became part of the legal underpinning of the Red Scare of 1919-1920, American’s first anti-Communist crusade.

In their time, the Acts did prompt important discussions about free speech, and the right to defend criticism by demonstrating the truthfulness of statements. But historians and moralists agree that they were an awful example of a persistent urge in the human character, to blame “the other” for one’s troubles. Politicians in all ages become expert at exploiting that urge; it is the engine of demagoguery.