It’s the classic Internet-rage story: A family dog is shot by a police officer. The dog posed no threat, the owners say, and the officer was simply responding to a noise complaint. To make matters worse, the cop had the wrong house.

For dog lovers, this is a nightmare scenario that leaves even responsible owners feeling helpless.

The “Justice for Chloe” Facebook page, in honor of a 3-year-old dog who was shot by a Commerce City, Colorado, police officer has over 5,000 likes. A “Justice for Duchess” GoFundMe page has raised over $1,700 dollars to cover legal and funeral expenses for Duchess, a Florida City dog who was shot in her owner’s backyard in October.

“If you see the police anywhere near your house, your dog is in danger.”

Jeffrey Justice is an activist and has moderated the Dogs Shot By Police Facebook page, which compiles news on dog shootings by law enforcement, for the past four years. “It’s an endless parade of broken heroes. It’s depressing. You look at your Facebook, and you can just see the broken lives and sadness of these hundred and hundreds of pages. But what else can a person do to get some support for their dog?” Justice told the Daily Dot.

The last thing most police officers want is to shoot a family’s dog. Many are dog owners themselves. Jim Osorio is a former police officer who now trains police officers all over the country on how to properly interact with animals. Osorio told the Daily Dot that the Texas-based operation he works with, Canine Encounters Law Enforcement Training (CELET), has trained over 22,000 officers since it began in 2005, and there’s been an increase in requests over the past few years.

Fortunately for dog lovers and their pets—and police officers—the tragedy of a deadly encounter with law enforcement can be entirely avoidable. Here is everything you need to know about keeping your furry best friend safe when the police need to come knocking.

How often do police shoot people’s dogs?

Not a single federal, state, or local agency provides data on canine deaths by law enforcement. Laurel Matthews, a supervisory specialist at the Department of Justice’s Community Oriented Policing Services (DOJ COPS) told Police Magazine in October, however, that an estimated 25 to 30 dogs are killed by law enforcement officers per day. More than 1,000 dogs have been shot in Texas by law enforcement since 2010, according to the Texas Humane Legislation Network. But because not all police departments keep track of canine shootings, that number is not exact.

“There is no way to verify the number of dogs shot by police,” said Justice. “Personally, I think [the number of dogs killed by police is] high. There’s enough documented cases to know this is a big problem.”

Josh Wieder serves as director of technology at the Puppycide Database Project, an initiative that for the past 18 months has compiled lethal use of force incidents by police against companion animals nationwide. Wieder told the Daily Dot that there’s evidence to believe the DOJ‘s 20-30 dogs-killed-per-day figure is far too low.

“We are nowhere close to having complete dog killing records for

all 18,000 police departments,” Wieder told the Daily Dot. Puppycide DB looked at the dog-killing records of just 40 police departments. The data showed a mean killing rate of 10 dogs per department. Based on just that tiny sample, Wieder said, that rate would add up to 500 dogs a day nationwide.

“Do we think the numbers are that high? We aren’t sure,” Wieder said. “The point is

we don’t have enough evidence to make authoritative statements about

national rates, and neither does the Department of Justice.”

Why do police sometimes shoot dogs?

Why do police officers shoot canines in the first place? Wieder told the Daily Dot that he found most dog killings started in two ways:

A dog escapes his house to roam free around the neighborhood and is reported to police by a neighbor. Police respond to a house for an innocuous complaint, such as a noise complaint, and they are surprised by the family dog.

In an effort to detect trends in the incidents, Puppycide DB looked at more than 1,400 cases where police shot dogs. Of those cases, 1 in 5 involved a child who was in the line of fire or in the immediate area of a shooting, Wieder told the Daily Dot. Wieder and his team confirmed 338 dog shootings in which children were present.

The 6-year old grandson of Renata Simmons was sitting on a picnic table outside when police officers arrived at the scene and shot Vinny, one of Simmon’s German shepherds. After the grisly sequence of events transpired, Simmons said she realized she had to do something.

“I immediately sat down and did a Facebook page and sent it to news outlets all over the country,” said Simmons. When her lawyers said the most she could hope for in court was $1,700 in damages, Simmons realized she had to do more to ensure that history wouldn’t repeat itself.

“We are nowhere close to having complete dog killing records for all 18,000 police departments.”

As far as why an officer would perceive a dog as a threat serious enough to pull the trigger, Simmons thinks it boils down to a lack of training. Some officers have a fear of dogs, or a lack of knowledge of how to deal with them. The officer had shot Vinny after he ran up to greet him, according to Simmons, perceiving him as dangerous.

“They aren’t trained on how to handle animals,” said Simmons. In many situations, a nightstick, or voice commands, could have been used instead of a gun. Dr. Ron Martinelli, a retired police officer, gave a list of alternatives to shooting a dog to Police Magazine. They included bringing in animal control, using a taser gun, or asking owners to lock the dog up.

“My 14 year old granddaughter could have diffused any of those situations,” said Simmons.

Simmons, the founder of Prevention Against Canine Killings, along with activists such as Cindy Boling, successfully lobbied the Texas legislature to approve a bill that would make canine training mandatory for police officers. Beginning in January, a four-hour in-person training on interacting with canines will be mandatory for all Texas police officers. After the efforts of Justice and other animal rights activists, Colorado enacted a law last year that made canine training for police officers mandatory.

So, how do you prevent your dog from getting shot by law enforcement in the first place? The Daily Dot spoke to a variety of experts to find out how to keep your dog safe from being unnecessarily shot by the police. Here are the safety measures every dog-owner should take.

Avoid leaving your dog unattended

Not letting your dog roam free and unattended is the easiest and most common-sense way to keeping him or her safe—even if it means a limitation on your lifestyle. In many states, including the District of Columbia, it’s illegal to leave your dog alone in public at all. Many state laws and city ordinances ban owners from leaving their tethered dogs outside or keeping their dog alone in their vehicle.

A great number of dog-shooting cases happened when the owner was not present. Keeping tabs on your dog isn’t just to avoid it being mistaken for a stray. If your collared dog hurts another human, it might invite police intervention.

In the case of Nala, a 7-year-old Shar-Pei in Baltimore, Maryland, the dog was unattended when it bit a pregnant women who had leaned down to check the dog’s identification tags.

Keep your dog crated during police interactions

If you know that police are going to be in the area, keep your dog crated. Do not let your dog roam your house unleashed or leave them outside unattended, even if they are tied up, when police are on your property. Cleveland Police in June shot Muzzi, a leashed 2-year old golden retriever who had been in its owner’s yard. Justice advises owners to place their dogs in a room where they won’t have any interaction with the police whatsoever. “If you see the police anywhere near your house, your dog is in danger,” said Justice.

This includes cases where you yourself have requested the help of law enforcement, such as after reporting a burglary. Candy, a 2-year old blue heeler in Texas whose owner had reported a break-in, was shot in the back of the head by a deputy responding to the scene. The officer said Candy had charged at him after he parked behind the owner’s truck, according to WFAA. The officer had not been bitten.

In both the cases of Candy and Muzzi, law enforcement said they had to shoot because they “felt threatened.” Police officers who shoot while on-duty due to being threatened have strong legal protections, known as “qualified immunity.” This generally results in courts weighing in the officer’s favor if their actions are ever challenged by a dog’s owner. ALDF’s Heiser advised keeping your dog secured and out of the officer’s way so it won’t be perceived as a threat.

“If there’s no interaction, there’s no potential justification for the officer to have qualified immunity in the event of a shooting,” Heisser told the Daily Dot.

If the police arrive at your door unexpectedly, ask the officer for time to secure your dog. “If an officer approaches your property or comes to your door, take a moment to put your best friend away in another room or safely crated,” said Simmons.

Get a “Dog in Yard” sign and keep gates secure

Giving law enforcement an early heads up that a canine is on the premises will keep them from being surprised. A series of four 10-minute videos by Safe Humane Chicago and the National Canine Research Council instructs officers in Chicago to look for visible signs of dog ownership. These include a sign announcing that a dog is in the yard, along with dog toys, food dishes, and water bowls. Even officers who have not undergone this training are likely to notice the signs as they assess the premises.

Unless your dog is prone to aggression or has other behavior issues, Simmons recommends opting for a simple “Dog in Yard” or “Dog on Premises” sign rather than the typical “Beware of Dog” yard signs.

Finally, make sure a broken gate or fence doesn’t aid your dog in escaping. the Animal Legal Defense Fund advises dog owners to fix all fences, gates, and screens. Overly protective dogs alarmed by a stranger’s presence have often escaped through screens, gates, or holes in fences, the ALDF noted.

What to do if your dog is shot by police

What should you do if your dog ends up getting shot by the police? State laws can determine whether the killing was justified, according to the ADLF. Some states allow the shooting of unleashed or unlicensed animals on personal property. Scott Heiser, head of the ALDF’s criminal justice program, advises calling your attorney to figure out the options for legal recourse. According to Heiser, police officers are rarely held accountable internally for canine shootings. ALDF has a useful guide on what steps to take if your dog gets shot by police.

If possible, make sure you have video footage of the incident. Especially in the absence of a witness, video footage can serve as valuable evidence of police wrongdoing. The ACLU has a Mobile Justice app to record police misconduct.

“If people didn’t fight back, we wouldn’t be far along as we are.”

While the process is long, costly, and laborious, filing a federal civil-rights claim is often the only option that owners have to hold officers accountable. Owners can file on the grounds of an unreasonable Fourth Amendment search and seizure and a violation of their civil rights. But many times, Heiser said, federal civil-rights claims fail if the officer says they perceived the dog to be a threat.

“Make no mistake. The police have the huge advantage,” said Justice, who says he’s seen many dog owners pursue legal action, only to fail. Despite the low rate of success, Justice says dog owners should pursue legal action if they are able. A mixture of public backlash and an increase in dog shooting lawsuits have convinced many police departments to seek canine training for their officers.

And more law enforcement officers who shoot dogs are facing retribution. In the case of Nala, Jeffrey Bolger, a Baltimore City police officer who is facing felony charges for slitting the throat of the family dog.

“If people didn’t fight back,” said Justice, “we wouldn’t be far along as we are.”

Illustration by Bruno Moraes