As Speaker Nancy Pelosi, D-Calif., urged the House of Representatives to draw up articles of impeachment against President Donald Trump, she implied that James Madison — the "Father of the Constitution" — would have demanded Trump's impeachment for betraying the national trust to a foreign power. It's no small irony, then, that congressional Democrats voted for an article of impeachment that would have imperiled Madison's own presidency. Although the specifics differ, Trump's dealings with Ukraine in 2019 closely parallel Madison's engagement of France in 1812. The similarities offer a powerful lesson for today: Rashly accusing our political opponents of criminal behavior makes our nation vulnerable to foreign interference and creates a downward spiral that could lead to catastrophic consequences.

In 1812, Madison presided over a nation bitterly divided between two political parties — Federalists and Democratic-Republicans. As war raged between Britain and France in Europe, the parties disagreed over foreign policy and staked out opposing sides of the conflict. Federalists accused Democratic-Republicans of serving French interests, and Democratic-Republicans charged Federalists with inviting British dominion over the United States.

Early in the year, John Henry, a former British spy embittered by his poor compensation, decided to exact revenge on Britain by selling secret British documents to Madison's Democratic-Republican administration. The documents purportedly contained incriminating information about Federalists who conspired with the British government against the United States.

Henry worked through a French national named Paul-Émile Soubiron, a sleazy con artist who helped Henry recruit the favor of the French ambassador in Washington. Hoping that the documents would compel the United States to join France in war against Britain, the ambassador used Soubiron as a sort of shadow representative. Like Russian agents who peddle conspiracy theories of Ukraine's collusion with Democrats, the ambassador hoped to convince the president that they shared a British enemy who cooperated with a supposedly debased opposition party in America.

Madison took the bait, jumping at the opportunity to confirm his suspicions about his political adversaries. He spent $50,000 of State Department money to obtain the documents. The administration asked Henry to write a misleading cover letter that implied that he donated the documents to the government, withholding the fact that Madison had paid the entire balance of the contingent foreign intercourse budget to receive them.

Initially, the papers did embarrass the president's political adversaries after he argued that they proved Federalist collusion with Britain. Madison's ally Thomas Jefferson privately gloated that the information prostrated Federalists. In reality, however, while the documents showed that some Federalists harbored antipathy for the union and sympathy for Britain, they yielded no legally damaging information.

Federalists' embarrassment turned to outrage after they learned how Madison obtained the documents. They charged that he had paid a vast sum of public money to foreign nationals for his personal political benefit. Madison admitted in a private letter that the documents did not legally implicate Federalists even though they proved that Britain had tried to enlist Federalists' help.

In June, Madison referenced the papers as a reason to declare war on Britain, claiming that they at least revealed British malfeasance for attempting to interfere in U.S. politics and recruit disaffected Americans.

Despite Federalist indignation, there was never a whisper in Congress about impeaching the president over the issue. As the minority party in both houses of Congress, Federalists had little ability to impeach or remove the president, but they never called for it or even hinted at it.

It is impossible to ignore present-day comparisons. Trump and Madison both got caught up in conspiracy theories that foreign actors held legal dirt on their political rivals. Neither possessed good evidence that his opponents had committed crimes, but they still leveraged public money and executive resources to obtain potentially incriminating information about political foes. Both initially tried to hide their actions from Congress and the public (Madison with Henry's misleading cover letter and Trump with the placement of the July 25 call transcript in a secure server). Both schemes also had the cover of a legitimate investigation into wrongdoing and foreign interference, even as the president accepted help from corrupt foreign nationals (such as Soubiron in Madison's case or Ukrainian Yuri Lutsenko in Trump's).

Nearly point by point, Madison engaged in the same conduct as Trump — reacting to political opposition with imprudent, improper and reckless behavior. But imprudence, impropriety and recklessness do not necessarily warrant impeachment and removal — as the Madison case proved at a time when many of the founders, with their closer understanding of what the impeachment clause intended, remained involved in American politics.

Many pundits and politicians have described Trump's actions as unprecedented. Actually, what is unprecedented about the situation is the opposition party's decision to impeach the president over such actions — something even hyperpartisan Federalists avoided suggesting against Madison (except for some minor grumblings a couple of years later over a separate matter).

The founding period serves as a warning that partisan political paranoia may advance the interests of foreign powers. Only France emerged a winner from the Henry-Madison affair after the situation embarrassed Great Britain, the Federalists and Madison. As the French ambassador had hoped, it further soured relations between the United States and England.

What's more troubling is how these accusations and counteraccusations of foreign collusion brought the founders dangerously close to criminalizing political dissent. In 1798, Federalists criminalized slander against the president — Federalist John Adams at the time — on the pretext that Democratic-Republican printers would embolden America's enemies in France. Democratic-Republicans responded in kind when they gained power. The Henry-Madison episode was only one instance in a longer history of accusing political opponents of foreign collusion and criminality.

The cycle had a calamitous impact on foreign policy. By 1812, misguidedly convinced that only military combat could purge the nation of British interference, Democratic-Republicans declared a war on Britain that reduced the capital to ashes two years later. Since Republicans' ill-advised impeachment of President Bill Clinton in 1998, Americans have once more edged ever closer to criminalizing political difference. The trend accelerated in 2016 when Trump supporters cheered for the imprisonment of Hillary Clinton with gleeful cries of "Lock her up!"

Foreign interference has again heightened the tension. Americans have endured three years of criminal probes of the president for alleged foreign collusion. In response, Trump and his allies have answered with calls to "investigate the investigators" — claiming that politically biased law enforcement officials spied on Trump's campaign.

American partisans have developed a worrisome enthusiasm for accusing their political rivals of criminal behavior.

Like Madison's interactions with Henry and Soubiron, Trump's actions in Ukraine expose a troubling tendency to go to dangerous lengths to find criminal connections between political enemies and foreign nationals or governments. They are symptoms of a disease far worse than a single problematic presidency. They reveal that Americans have again become caught in a cycle of accusing each other of foreign collusion, which exacerbates political partisanship, which facilitates foreign interference, which again prompts accusations of foreign collusion.

The cycle didn't end well for early Americans, and it won't end well for us. The problem then and now isn't partisanship. It is the tendency to see our political opponents in their worst light, which justifies seeing them as capable of anything. We can fight fierce partisan battles without resorting to such distortions. If we insist on making criminals out of our political opponents, we will reap the destruction of our own democracy, without help from foreign powers.

Tyson Reeder is an editor of the "Papers of James Madison" and an affiliated assistant professor in the Corcoran Department of History at the University of Virginia. He wrote this article for the Washington Post.