A 25-pound pet dog in Boulder, Colorado, was nearly killed by a mountain lion, and the entire incident was captured on a doorbell security camera. At around 8:30 p.m. on February 4, the dog’s owner, who has not been identified in news reports, put her dog out in the backyard. Everything seems normal at first—but then the small pooch starts going bonkers, running around the yard and barking. It quickly becomes clear why. A mountain lion appears out of nowhere and comes running right at the dog.

Things look like they’ll end poorly, but then suddenly, the dog’s owner shoots out of the back door, sees what’s happening, and lets out a blood-curdling scream. The mountain lion flees, though it’s not shown on camera. And it’s not particularly surprising that it does—the woman can really yell with some power. Meanwhile, the pet dog runs frantically around the yard as the woman continues screaming. The woman then tries to shepherd the dog back inside to safety. Colorado’s Fox 31 posted the video of the incident online. See—and hear—it for yourself below.

Things could have ended up very differently had the dog’s owner not reacted so quickly to the attack. According to Colorado Parks and Wildlife (CPW), there have been three confirmed mountain lion attacks on dogs in the same Boulder neighborhood since mid-January. In two of those attacks, the mountain lion killed the dogs. There are thought to be two problem lions responsible for these recent incidents. CPW officials are working on capturing and relocating the big cats.

Read Next: Iditarod Dog-Sled Team Trampled in Alaska Moose Attack

In the meantime, the CPW maintains a webpage that details the best practices for safety in mountain lion country. The agency says that in the case of an aggressive lion, individuals should “throw stones, branches or whatever you can get your hands on without crouching down or turning your back. Wave your arms slowly and speak firmly. What you want to do is convince the lion you are not prey and that you may in fact be a danger to the lion.” In this case, screaming loudly and aggressively right at the mountain lion seemed to do the job.