The incident was reported on Sunday at the Walt Whitman Service Area.
A woman stepped out of her car to let her dogs out for a walk, but as she went to open the passenger door, she realized she accidentally locked the car with her keys inside.
The woman called 911 and by the time officers arrived, the dogs were panting heavily inside the hot car.
The troopers broke a window to unlock the car and the dogs were safely rescued.
The woman said she was appreciative of the troopers' quick actions, but she has learned a valuable lesson.
Officers are reminding everyone to secure their keys before stepping out of a car with children or animals inside.
* More New Jersey news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
* Follow us on YouTube