This piece was originally published on Just Security, an online forum for analysis of U.S. national security law and policy.

Although strict social distancing measures have been in effect for only a relatively short time, lawsuits challenging them are springing up around the country. Typical is a case filed by the Blueberry Hill Public Golf Course & Lounge in Pennsylvania, claiming that Gov. Tom Wolf violated the owner’s constitutional rights by issuing an emergency decree shutting down all businesses not qualifying as “life-sustaining.”

No doubt most governors (and mayors) view these suits as annoying distractions from the urgent need to steer their states through the unprecedented public health crisis confronting them, but nothing more. Unfortunately, they may be underestimating the magnitude of the threat, just as many underestimated the enormity of the threat posed by the virus itself.

The latest development—the Barr Justice Department’s intervention on behalf of a small Mississippi church against a city of Greenville public health order—should make that perfectly clear. How these cases play out will depend in significant part on how ideologically driven judges “interpret” the Constitution and laws in an area where there is little precedent to guide their judgments, and on public sentiment in different parts of the country.

Our nation has faced similar challenges before. Although we have mostly been able to avoid the need for the sustained exercise of emergency powers, that was decidedly not the case during the Civil War. President Lincoln reluctantly concluded that the ordinary processes of law were simply not up to the task of suppressing the Rebellion. When he suspended habeas corpus and decreed martial law throughout the Union, however, he ran headlong into judicial resistance, much of it from judges and juries who opposed the war or were even Confederate sympathizers.

Literally thousands of cases dogged Lincoln’s efforts to save the Union. The first and most famous was the Merryman case, decided by Lincoln’s great constitutional antagonist Chief Justice Roger B. Taney, author of the infamous Dred Scott decision. Notwithstanding the fact that the nation’s undefended capital was surrounded by Robert E. Lee’s army and that Confederate sympathizers were sabotaging the rail lines in Maryland to keep the Union army from coming to Washington’s defense, Taney declared the president’s suspension of habeas corpus unconstitutional.

Lincoln was not deterred. Refusing to accept this potentially crippling blow to his effort to save the Union, Lincoln responded by ignoring Taney and continuing to enforce his emergency measures. Nor was Taney the last judge to resist. Throughout the country—and in the face of Lincoln’s suspension of habeas corpus—judges continued to issue habeas writs and interfere with military decisions. Some went so far as literally to arrest the movements of the Union army as they mulled over claims that soldiers were inducted unlawfully into the armed forces. Lincoln’s response was the same as it had been to Taney: He persisted in doing what he thought was both necessary and right.

Under emergency rule, individual rights were frequently overridden. Citizens of loyal states—mostly Confederate agents and sympathizers—were held in military custody and sometimes tried before military commissions. Others suffered loss of property, such as horses and railroad cars requisitioned by Union officers.

These measures spawned thousands of additional lawsuits against Union soldiers, officers, and even Cabinet officials, including the Secretaries of State and War. In many cases, local prosecutors joined in the resistance and instituted criminal proceedings.

To be sure, most of those cases were filed in states where public opinion about the war was sharply divided. But had they not been checked, the Union effort could not have survived the judicial onslaught. At Lincoln’s behest, Congress responded by passing legislation immunizing all Union officials acting under orders of the president from liability, and transferring all such cases from the state to the federal courts, where they were dismissed. Nonetheless, some state courts persisted, declaring the new law unconstitutional and continuing their persecution of Union officers.

There are enormous differences between the Civil War and the current COVID-19 crisis. When it comes to lawsuits seeking to interfere with their exercise of discretion, however, governors and mayors today should take care to avoid a similar dynamic to the one faced by Lincoln, which could equally threaten their efforts to deal with the emergency they face.

In Lincoln’s case, the problem stemmed from divided opinion about the War. Then, as now, even judges could not resist the influence of their own political views and those of their communities. This, along with genuine concerns about the dangers of emergency rule, fueled judicial resistance to Lincoln’s war effort.

Unfortunately, opinion today is also sharply divided about how to deal with the coronavirus threat, and these divisions promise to sharpen over time. As a result, the situation is as ripe for judicial resistance as it was in Lincoln’s time. History suggests that it would be a mistake to underestimate the potential damage these suits might inflict on the effort to suppress the virus.

Worse, the problem may prove even more difficult to manage than it was during the Civil War. Whereas our greatest president, Abraham Lincoln, took charge of the war to suppress the Rebellion, President Trump has ceded leadership in the campaign to suppress the virus to the state governors, who have been forced to exercise emergency powers while he criticizes from the sidelines, periodically expressing his impatience with the closing of the economy.

Trump’s increasingly confrontational mode with the governors already sends an ominous signal that may influence the attitude of judges in the burgeoning litigations. Even before the Mississippi litigation, Attorney General William Barr piled on, expressing doubts about the governors’ use of emergency powers and forcefully stating his concern about the impact on the rights of Americans. In a Fox News interview, Barr said his department will “be keeping a careful eye” on whether states violate Americans’ constitutional rights through public health measures.

Barr’s Fox interview was clearly a shot across the bow and a signal of the Trump administration’s plan to use the courts to bring the governors and mayors to heel. While the president’s dictatorial claims to “total” power over the states are clearly frivolous, the Justice Department has activated a more realistic strategy for bending the will of the states—litigation. Barr’s determination to bring the power of the federal government to back this kind of litigation is sure to provide ballast to courts inclined to intervene, especially the many judges who recently joined the federal bench as Trump appointees.

The initial signs of how the courts will decide these cases is not promising. Consider the recent Supreme Court decision in the Wisconsin election disaster. Facing a dangerous threat to public health, Gov. Tony Evers, in line with other governors, sought to delay the election. By the time the case reached the Supreme Court, however, the state Supreme Court had already rejected the governor’s approach, and the issue had narrowed to the validity of a minor change in the rules for absentee ballots, which was necessary to enable many Wisconsin voters to avoid the risky prospect of going to the polls. Even that was too much for the U.S. Supreme Court.

It is difficult to avoid seeing partisan motivations behind these judicial decisions. The most striking feature of the Supreme Court’s decision, however, is the extent to which it ignores the existence of the coronavirus crisis. The majority’s silence appears to suggest that the threat to public health posed by the virus is simply not, in its view, a sufficient basis for extraordinary measures.

Even more concerning, however, is the approach of a federal judge in Kentucky, Judge Justin Walker, whom Trump has nominated to a seat on the powerful U.S. Court of Appeals for the District of Columbia Circuit. Evidently taking his cue from the president and the attorney-general, Judge Walker unleashed a rhetorical fusillade against a local mayor for allegedly prohibiting drive-in church Easter celebrations. Although, remarkably, the mayor had not actually issued any such prohibition, the judge, who refused even to permit the mayor to participate in the case, took the opportunity to excoriate him while also delivering a lecture on the constitutional freedom of religion and its application to what was in fact a hypothetical public health measure to curb the coronavirus.

To be sure, we should all be concerned about the exercise of emergency powers. Governors, however, do not have unlimited emergency powers, but act under authorizing statutes passed by their legislatures. In times of crisis, our best bet is to look to the legislatures to police their governors, not to the courts, especially courts invoking the “Bill of Rights” to ensure that they have the last word.

Hopefully, courts will mostly reject the many lawsuits now being filed, and the many more frivolous ones to come. Judges are usually inclined to defer to executive discretion in dangerous emergencies. However, if the Civil War experience is any indication—and there are clear signs that it is—a secondary crisis may well be on the horizon, for which our governors and mayors should be better prepared than they were for the pandemic itself.

More From Just Security:

When International Dysfunctionality Really Matters

An Abuse of Presidential Authority and American Power: Halting U.S. Funding for the World Health Organization

For more on the impact of COVID-19, listen to today’s What Next.