Federal agents have spent the past week arresting people around the nation who were allegedly part of the mob that stormed the Capitol on Jan. 6, after President Trump urged a rally crowd to “fight like hell” to overturn the election results. But many of those charged with crimes for their alleged roles in the riot can plausibly raise what is known as the “public authority” defense — arguing, essentially, that Trump gave them permission to do what they did.

Here’s how it works. Suppose the chief of police in a town said you could ignore a “no parking” sign and park in an otherwise forbidden place. Suppose also that you relied on his word and parked in that place. Then suppose a police officer later handed you a parking ticket.

You’d have a defense. Specifically, you could point at the authority figure who invited you to commit the illegal act. The spotlight then turns to the authority figure: Did the chief of police have the power to waive the parking restriction? If not, was it reasonable for you to believe that he did? Did you have reason to know that you shouldn’t park there, even if he said you could?

That the rioters genuinely believed they were acting at the direction of the appropriate authority figures explains their mood as they posted selfies and bragged about what they were doing on social media. If you think of yourself as a soldier doing the bidding of the commander in chief, you don’t try to hide your actions. You assume you will be held up as a hero by the nation.

The public authority defense is common and well-known to lawyers. In the defining case, United States v. Tallmadge, a federally licensed gun dealer told the defendant that his circumstances fit into an exception to the prohibition against felons owning firearms. The defendant relied on the dealer’s word and purchased the firearm. The court found that licensed firearm dealers are federal agents for gathering and dispensing information about the purchase of firearms. It was reasonable, therefore, for the defendant to rely on the dealer’s word. The defendant was thus found not guilty.

To take another example, in 2007, 12 residents of Sacramento and Fresno, Calif., were accused of plotting to overthrow the communist government of Laos. The U.S. attorney’s office dropped the charges after one of us, Mark Reichel, representing the defendants, pointed to evidence that they were lured into the conspiracy by an undercover federal agent posing as a CIA officer. The defendants reasonably believed they were acting at the urging of the American government and therefore weren’t guilty of entering a criminal conspiracy.

The public authority defense doesn’t necessarily mean the rioters are off the hook: They can still be arrested, charged and brought to trial. But depending on the circumstances, a defense like this one can mitigate or even eliminate their culpability or lessen their punishment.

And the availability of this defense also makes it more likely that the instigators — including Trump, who’s already been impeached over the riot — will face prosecution. After all, how would it look to a jury if the people who incited the failed insurrection went free, while the victims of lies and disinformation paid the price? Such an outcome would be offensive to the idea of fairness and equal justice for all.

The lies maliciously and deliberately spread by Republican leaders were a direct cause of the riots. They told people there was widespread fraud in the election, although they knew this was not true. Their victims may not have understood that judges were throwing these cases out of court because there was no evidence, but the lawyers representing the president, and someone like Sen. Josh Hawley (R-Mo.) — a graduate of Yale Law School who was the first senator to agree to challenge the election results — certainly did.

Each day, more evidence emerges that Trump and other elected officials instigated this riot. The rioters were lured to Washington with the president’s promise that the day would “be wild.” At the rally, Rudolph W. Giuliani — Trump’s lawyer and close adviser — called for “trial by combat.” Rep. Mo Brooks (R-Ala.) told the crowd to “start taking down names and kicking ass.” Trump told his audience, “When you catch somebody in a fraud, you’re allowed to go by very different rules.”

Journalists on the scene reported that the rioters were primed and ready for action, and many believed they should kill Vice President Pence. Hawley raised a power fist to the crowd on his way into the Capitol for the joint session of Congress that the riot shortly disrupted. After repeatedly telling his supporters to take action, Trump said: “We’re going to walk down Pennsylvania Avenue . . . and we’re going to the Capitol. . . . We’re going to try and give our Republicans, the weak ones . . . the kind of pride and boldness that they need to take back our country.”

When the crowd arrived at the Capitol, the guards opened the door and let them in. Trump went back to the White House and watched the coverage. He was reportedly elated.

Many of the instigators of the riot — and many who spread the lies that sparked it — are now issuing carefully worded statements condemning the violence. This kind of doublespeak (instigate a riot and then disavow the resulting violence) may work in right-wing media outlets, but it should not work in a court of law, where facts still matter.

Given how tenaciously some Republicans are clinging to their right to spread lies — even now, many GOP leaders are insisting that fraud in the 2020 election was widespread — it is perhaps too much to hope that the shocking example of how these lies led to the desecration and defilement of the Capitol will stop them. What it may take to stop them — and deter others from spreading lies — will be seeing their names dragged into a criminal trial as part of a defense, which in turn will shine a spotlight on them. Maybe they don’t care that their lies have deadly consequences. But they probably will care about their criminal liability.