Police agencies spend thousands of dollars and months of training to teach dogs how to sniff out and alert officers to the presence of marijuana, heroin, cocaine and other drugs. If pot use becomes legal, the dogs would likely either have to be retrained — which some handlers say is impossible or impractical — or retired.

“The biggest thing for law enforcement is, you’re going to have to replace all of your dogs,” said Macon County Sheriff Howard Buffett, whose private foundation paid $2.2 million in 2016 to support K-9 units in 33 counties across Illinois. “So to me, it’s a giant step forward for drug dealers, and it’s a giant step backwards for law enforcements and the residents of the community.”

Later in the story, a K-9 trainer suggests some or most of the dogs will need to euthanized.

(By the way, if you think it’s weird that a sheriff would have a “personal foundation” capable of spending more than $2 million on drug dog units for other police departments, so did I. It turns out that Sheriff Buffett is the middle child of the billionaire Warren Buffett.)

There’s a lot to unpack here. First, I’d dispute Buffett’s assertion that legalization is a “giant step forward for drug dealers.” This is true only if you consider retailers who sell marijuana legally to be “drug dealers.” If by “drug dealers” you mean cartels and kingpins who sell the drug on the black market and use violence to settle disputes, legalization is actually pretty bad for them.

But let’s get back to the dogs. Even if it were true that marijuana legalization in Illinois would mean that all drug dogs in the state had to be euthanized, that isn’t an argument to keep marijuana illegal. I’m a dog person. But the drug war is not a make-work program for canines. Second, nine states have already legalized medical marijuana. As far as I know, there hasn’t been mass euthanization of drug dogs in those states. Third, the law enforcement officials in the article argue that even if the dogs aren’t euthanized, they have been very expensive to purchase and train, and replacing them or retraining them to disregard marijuana and alert only to other drugs will be expensive. This, again, is not a persuasive argument for keeping marijuana illegal. The debate is really over whether we should be locking people up over a mostly harmless drug. If it’s wrong to do so, the fact that we’ve already spent a lot of money on a system to enforce a policy we now believe to be wrong is an argument against continuing that policy, not in favor of it. Put another way, if you think marijuana prohibition is justified, then spending money on drug dogs is justified. If you think marijuana prohibition is immoral, how much money we’ve already spent on enforcing that policy has no bearing on whether we should continue spending money on that policy in the future.

But if we are going to talk about cost, do you know what else is expensive? Arresting and jailing people for pot. The Chicago Reader estimated that in 2010, Cook County alone spent more than $78 million arresting and prosecuting people only for possession of marijuana. If we’re really worried about the golden years of drug dogs, that kind of money could purchase them a pretty nice retirement community. I’m thinking bubbling streams, platinum fire hydrants every few feet and a lifetime supply of top-shelf kibble.

But I want to address another part of this story that isn’t getting much attention. I’ve written quite a bit about drug dogs in Illinois, and it turns out they’re pretty terrible at detecting drugs. In 2011, the Chicago Tribunepublished a review of drug dog searches conducted over three years by police departments in the Chicago suburbs. Just 44 percent of dog alerts led to the discovery of actual contraband. For Hispanic drivers, the success rate dipped to 27 percent. The following year, I obtained the records of an Illinois State Police drug dog for an 11-month period in 2007 and 2008. In nearly 30 percent of cases where the dog “alerted” no drugs at all were found. In about 75 percent of cases, the dog alerted either to no drugs or to what police officers later described as “residue,” which basically means no measurable quantity of a drug and not a significant-enough amount to merit criminal charges. Only 10 percent of the alerts resulted in a seizure of a large-enough quantity of drugs to charge someone with a felony.

This is pretty consistent with statistics from other states, as well as one fascinating academic study, which have shown that drug dogs are far more likely to merely confirm the hunches and suspicions of their handlers than they are to independently detect illicit drugs. The dogs’ high error rates often make them no more accurate than a coin flip. The problem of course is that the entire purpose of the Fourth Amendment is to protect us from searches based solely on a government official’s hunch or suspicion. There’s a reason some legal scholars call drug dogs “probable cause on a leash.”

The K9 trainers I’ve interviewed over the years have told me that drug dogs could actually be trained to only alert when there is a significant quantity of an illicit drug — that is, to ignore “residue.” The reason they aren’t is that police departments don’t want them trained that way. They want dogs that alert as often as possible. They want the dogs to err on the side of false alerts.

Why would police want a dog that falsely alerts? That’s the exact question the late Supreme Court Justice Antonin Scalia asked in a drug dog case a few years ago. The answer is incentives. Searches can lead to evidence of other illegal activity. One incentive is that police officers, particular those in drug enforcement, often evaluated based on the raw numbers of arrests. More searches mean more opportunities to make arrests.

But the more important incentive is civil-asset forfeiture. If the police find even the slightest bit of pot, sometimes even just residue, they can often justify taking a driver’s cash, jewelry or even the car itself. The owner of the property — even if completely innocent — then must endure a number of legal and procedural barriers to getting the property back. Take, for example, the K-9 whose records I reviewed several years ago.

In one case, the discovery of 2 grams of marijuana led to the seizure of $5,190 in cash. In another, 2 grams of pot led to the arrest of the vehicle’s seven occupants and seizure of the $2,000 they had between them. In another, 3 grams of marijuana led to 9 arrests and seizure of $2080. In yet another, one motorist caught with 1.2 grams of pot was arrested and forfeited more than $9,000. Another motorist wasn’t arrested, but had more than $2,000 in cash taken from him because the officer found what he says in the report was marijuana residue. It’s unclear if the residue was either subjected to a field test or taken to a lab for testing.

So over 11 months, this drug dog with an error rate of somewhere between 30 percent and 70 percent may have subjected dozens of people to illegal searches, but the pooch also brought in $11,000 for the state police. The dog is, er, a cash cow.

One particularly lucrative part of the state for police is the I-55/I-70 corridor near the town of Collinsville, which brings in a half-million dollars or more per year for local police. A local police officer pulled over Terrance Huff in 2011 while he was returning from a “Star Trek” fan convention. After the dog “alerted,” the cops searched Huff’s car from top to bottom. They found only what they called “shake,” or marijuana residue. K9 trainers who watched the video of the stop say the dog and officer interactions look like a dog that alerted on command, rather than when the dog detected an illicit substance. Huff later sued. During discovery for his lawsuit, he learned that the officer who pulled him over sometimes “trained” his dog by rubbing marijuana on the bumpers of cars parked in motel parking lots. If those cars were to be later pulled over and sniffed — voila! — instant probable cause for a search.

The police in Illinois aren’t worried about the well-being of drug dogs. They’re worried about the well-being of drug cops. Lots of law enforcement jobs — K9 cops, drug task forces, narcotics detectives — depend on the government’s continued pursuit of marijuana. So, too, do the revenue streams of many police departments and prosecutors’ offices. When there’s a threat to that revenue, they’ll do anything to protect it, including making threats to euthanize dogs, or warning that if we dare to stop cops from taking money from people without due process, we’ll soon see headless bodies hanging from bridges.

Illinois cops have been using their police dogs to violate the rights of people living in or passing through that state for decades. If marijuana legalization puts a damper on that practice, that’s a feature of reform, not a bug.

We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.

Radley Balko writes and edits The Watch, a reported blog covering civil liberties and the criminal-justice system. Previously, he was an investigative reporter for the Huffington Post and a writer and editor for Reason magazine. His most recent book is "The Cadaver King and the Country Dentist: A True Story of Injustice in the American South."