Last week, two officers from the Arkansas City Police Department in Kansas were responding to a call about a shoplifter at a Wal-Mart when they were alerted to a dog that had hanged himself by his leash when he jumped out a parked truck’s window. Thanks to their quick actions, they saved the unconscious dog using CPR.

On Friday, July 8th, Sergeant Jason Legleiter and Officer Wade Hammond had just secured a shoplifter in the back of their patrol car when a Wal-Mart employee rushed over to tell them that a dog was suspended by his leash, which was attached to something inside a truck.

The officers saw that the dog was completely still and appeared to be dead, so they immediately jumped right into action.

“Legleiter was quick to think on his feet and used his patrol duty knife to cut the dog down in an instant,” reads the department’s Facebook post of the event. “Officer Hammond began tending to the dog’s care as the dog lay on the ground and was unresponsive.”

Hammond removed the dog’s collar and began “applying pressure intermittently” to his side. After several very tense minutes, the dog came back to life. Before long, he was even standing on his own.

“There is absolutely no doubt that Sergeant Legleiter’s and Officer Hammond’s quick response and care saved this dog’s life,” ACPD said. “Photographs attached [from body cams] demonstrate the gravity of the situation and show in contrast what their actions did to prevent a tragic accident.”

While the dog’s owner at least did not leave him in the truck with the windows (mostly) closed, it is always advisable to leave pets at home while running errands, especially in the summer. Even when parked in the shade, with the windows open, or with the car running, dogs can die. Shade and open windows are not sufficient cooling methods, and inside temperatures can skyrocket to over 100 degrees in minutes. A car left running can be stolen, and if it’s on an automatic starter, it can shut off after a specific time or malfunction.