Security footage shows the moment a group of burglars broke into a car — saving a dog in the process.

WGN reported Wednesday that four men in Chicago smashed the window of a parked car, stole a laptop, then ran off.

>> Read more trending stories

What the men didn’t realize was there was a German shepherd sitting in the back of the car. It was a scorching day, with temperatures soaring into the high 80s.

"If the window wasn’t broken, the dog would probably be dead," Declan Morgan, owner of Irish Nobelman Pub, told WGN. "The dog was in the back seat. They didn’t realize the dog was in there. The windows were tinted in the back."

Security footage from a nearby pub caught the the whole thing on camera. According to the footage, the owner was gone for 20 minutes before the window was broken, and he didn’t return until 40 minutes later.