Under the heading of “How to Lead an Armed Insurrection Against the Government of the United States and Get Away with It”:

Rule No. 1: It helps to be a white guy wearing a cowboy hat.

Rule No. 2: Hope that the attorneys and FBI agents who are in charge of prosecuting you don’t pay any more attention to the rule of law than you do.

Cliven Bundy, the 71-year-old patriarch of a family whose members have made a living stealing the grass on public land for their cattle to graze on, walked out of a federal courthouse in Las Vegas Monday a free man.

It wasn’t just that a mistrial been declared in the matter of the Bundy-led armed standoff with federal agents. The judge in the case was moved to tell the government it couldn’t try the case again because prosecutors and investigators were guilty of “intentional abdication of … responsibility,” ″flagrant misconduct” and “substantial prejudice.”

What that apparently means is that the U.S. Attorney’s Office for Nevada had been caught in a serious violation of legal ethics. It had failed to turn over to Bundy’s defense lawyers a great deal of information about how the case was investigated and prosecuted.

Sharing such information with the defense is a basic right in the American legal system. Prosecutors who fail to do so get punished the only way the courts can punish them: They lose the case.

Unfortunately, at least in this matter, when the prosecutors lose, so do the American people.

Generally, the whole of the nation loses, as the acquittal gives aid and comfort to Bundy and his supporters. The losers also include all the American ranchers who pay the standard — and artificially low — fees that the federal government charges to run cattle on public land.

The Bundy clan are people who think so little of their country that they pay no heed to its laws and, when duly appointed officers try to enforce that law, produce a platoon of self-appointed soldiers to threaten them with assault rifles.

That’s what happened when federal agents, trying to enforce a court order to seize some of Bundy’s illegally fed cattle, were threatened and chose to retire from the field rather than run the risk of bloodshed on both sides.

Again, the maddening fact is that, by holding to the standards of a decent and lawful society, the federal government managed to hand a victory to people who have no such respect.

When Bundy walked away from the courthouse Monday, he was heard to say, “We’re not done with this.”

Indeed we are not.

Even if he and his gang can’t be tried in connection with the 2014 confrontation outside Bunkerville, Nev., Bundy shows no hint of being willing to obey the law going forward. There will likely be another chance to bring him to account.

And next time, we may hope, the government will do it right.