There have been plenty of stories recently about lost pets reunited with their owners thanks to microchips. But in this case, it wasn’t only the dog who was returned. The microchip implanted in a South Carolina dog helped police return the 3-year-old girl who was with him to their family as well, WJBF News reported.

While her parents slept, the child apparently followed their newly adopted dog, Angel, outside.

A resident in a nearby apartment complex spotted the pair and called the police. But when the girl wasn’t able to tell them where she lived, the authorities used a scanner to check the dog for a microchip.

The chip gave the officers information on how to get the owner’s name, address and phone number, and they were able to return the girl and her faithful companion to their home.

The girl’s parents wanted to protect their daughter’s identity and didn’t give reporters her name or theirs — but they did want everyone to meet the canine they called a “hero dog.”

Even though he’s been a member of the family for only a week, the girl’s mother said Angel kept the child in his sight the whole time. A police officer said Angel didn’t even want to get into a separate police car from the girl for the ride home.