On the Fourth of July, fireworks cause more dogs to escape than any other point in the year. While thunder and lightning present a constant source of stress and terror for your pooch, fireworks — especially those that detonate closer to the ground — fill the night sky with light and noise that torture poor pups.

Here’s why: The sudden, loud noises activate dogs’ sympathetic nervous systems, the same mechanism that exists in people and is responsible for our “fight or flight” response to sudden, stressful, or threatening stimuli. Fireworks bring dogs into a temporary state where their bodies go into overdrive so they can escape danger. It’s the same biological response that they would have in the wild if a predator started to chase them.

In fact, dogs are more spooked by fireworks than they are of gunshots, according to a 2015 study published in the academic journal Applied Animal Behavior Science. That goes for dogs that are otherwise brave and bold in everyday life, fireworks are terrifying, a 2013 study published in the same journal notes.

Dog personalities also play a surprisingly important role: If your dog is fearful, stressed, or aggressive on a regular basis, then you should definitely be ready because those dog personalities are more likely to panic30056-9/fulltext) when the fireworks start.

Thankfully, there are ways to use dog psychology to help pups chill.

An easy fix is taking your dog for a long walk before the festivities begin — if they’re tired, they’re less likely to be frightened and run away. Also, make sure any unscreened windows in your home are shut. If you have a big dog, you may not want to rely on the screen and shut your windows anyway; statistics from the American Society for the Prevention of Cruelty to Animals indicate that veterinarians see an inordinate amount of cases of high-rise syndrome — serious or fatal injuries suffered by pets who jump out of windows — around Independence Day.

You can also prepare in advance by training your dog out of its fearful response to noise through some canine classical conditioning. In the days or weeks leading up to Independence Day, play the sounds of fireworks, thunder, or other loud noises while reassuring your dog that the world isn’t ending. Pair these scary noises with positive experiences like treats or belly rubs so that your dog may become more comfortable with them over time.

Other potential solutions — like changing diet, dog clothing, and even medication — might help, though these mini-experiments should be handled carefully. And while lots of people claim they work, the actual data remain inconclusive. Which means unfortunately, the best cure for very good boys may be a comforting belly rub, soothing shushes, and an early bedtime.

Photos via Flickr / 1RN2GSD