For thousands of years, dogs and humans have kicked it side by side. Over the course of our millennia-long relationship, we’ve come to share things like a mutual love of snuggles and even our looks with our canine best friends. But according to a study published in Microbiome on Wednesday, that connection goes even deeper than we ever thought — all the way to our guts.

In both humans and dogs (and most other animals), the gut microbiome, or flora, consists of trillions of microorganisms living in the digestive tract. Scientists have previously shown that the gut microbiome is closely linked to the health of its host and is suspected to mediate the link between a person’s diet and overall wellness. Now, it seems that it links us to dogs, as well: In the paper, the international team of scientists reveal that dog and human guts contain very similar microbes. While not exactly the same, the dog and human microbes are actually largely related strains of the same species. This, in turn, indicates that dogs could help scientists learn more about the human gut microbiome — a model much more useful for comparison than mice.

Barack Obama, dog, Bo
Barack and Bo share similar gun microbiomes.

“The results of this comparison suggest that we are more similar to man’s best friend than we originally thought,” co-author Louis Pedro Coelho, Ph.D. of the European Molecular Biology Laboratory, announced in a statement released Wednesday. “These findings suggest that dogs could be a better model for nutrition studies than pigs or mice and we could potentially use data from dogs to study the impact of diet on gut microbiota in humans, and humans could be a good model to study the nutrition dogs.”

Coelho and his team conducted a trial involving 64 dogs, half beagles and half retrievers, with an equal number of fat and lean dogs. The idea was to study how a dog’s diet affected its microbiome, so the dogs were split into a high-protein, low-carbohydrate group while the other received a high-carb, low-protein diet. Over three collection periods at the beginning and end of the experiment as well as eight weeks after the study came to a close, the scientists collected 129 poop samples from the pups.

From the poop, the scientists extracted DNA, sequenced it, and thereby created a dog gut microbiome gene catalog containing 1,247,405 genes. Comparing the gene catalog to the microbiome gene collections that already existed for humans, mice, and pigs, they determined that dogs and humans had the most similar flora. They additionally found that the fat dogs had larger compositional shifts in their gut microbiomes than the skinnier ones, a small hint that the same could be true for humans as well.

If you’ve ever succumbed to the yearning gaze of a pup eyeing your lunch, the study findings should make a lot of sense. While all those animals (and humans) share a common ancestor that lived around 97 million years ago, dogs and humans in particular have been sharing food for millennia, which the scientists say could have served as a selective force that shaped the digestive and metabolic systems of dogs to be more like ours.