A family dog and a fast-thinking officer are credited with helping to get a Missouri toddler who wandered away from home back to safety.

KMOV-TV reports that on Tuesday, a 2-year-old Wentzville girl woke up from a nap and walked outside without her parents knowing. The girl and her dog were found wandering down a busy stretch of road.

Sarah Woodard and neighbors began knocking on doors to try and find the parents, but without success. That's when a police officer decided to have animal control scan the dog's microchip, which led them to the address.

The dog and girl were returned home safely. The parents were unaware the child had gotten up from her nap. She had been gone about 30 minutes.

Ryan McVay, ThinkStock