Dogs are a man's best friend. In this photo, Tomo McLoyd holds the paw of her dog Rocky, 14, as veterinarian Wendy McCulloch euthanizes the pet at their apartment in New York City, May 9, 2012. Getty Images/ John Moore

We are familiar with the famous saying “dog is a man’s best friend,” but no one could figure out exactly why this particular animal carries the capability of being so friendly toward humans. According to a study published Wednesday, the reason behind humans and dogs striking a common cord might be because the latter descended from wolves.

The study found that hyper-social canines carry variants of the genes GTF2I and GTF2IRD1, the deletion of which, in humans, triggers the Williams-Beuren Syndrome, or more commonly known as the Williams syndrome. Bridgett vonHoldt of Princeton University and her colleagues studied a portion of DNA in dogs that included 29 genes. They noticed that deletion of part or all of this section due to prolonged domestication seemed to cause the overtly friendly nature in dogs.

Read: Video Captures Police Officers Rescuing Dogs From 167-Degree Car

The National Organization for Rare Disorders characterizes WBS as a “rare genetic disorder characterized by growth delays before and after birth (prenatal and postnatal growth retardation), short stature, a varying degree of mental deficiency, and distinctive facial features that typically become more pronounced with age.”

WBS patients are known to exhibit symptoms such as a failure of cognitive abilities, elfin facial features and intense sociability. The genetic transformation might have happened thousands of years ago when some wolf species evolved to become the tame dogs we know today, the study states.

Dogs make the most faithful pets. In this photo, a man swims with his dog at St Kilda Beach in Melbourne, Australia, Jan. 12, 2010. Getty Images/ Scott Barbour

In the study published in Science Advances, a group of dogs were kept in the same captivity that a number of grey wolves were kept in. After their daily behavioral patterns were documented, it was observed that while both dogs and wolves showed similar practical and cognitive skills, they differed a great deal when it came to their interactive skills.

This means that their basic instincts were the same – both successfully located and retrieved sausages that were kept in plastic boxes. However, the dogs were found gazing at passersby and wagging their tails as signs of being friendly, while the wolves remained indifferent toward human presence.

It is because of their transformed DNAs that the wolves outperformed the dogs when both sets of animals were tested. Both wolves and dogs were told to retrieve food, first in the presence of human beings and next in isolation. It was observed that the margin at which the wolves beat the dogs was much greater in the first instance.

“It’s not that they couldn’t solve the puzzle, they were just too busy looking at the human to do it,” vonHoldt said, National Geographic reported. She added that dogs are still actively evolving psychologically, which might result in their behavioral traits transforming yet again in the future.

Read: Cannabis Treats Help Dogs Relax During 4th Of July Fireworks

“Our finding of genetic variation in both dogs and wolves provides a possible insight into animal personality, and may even suggest similar genes may have roles in other domestic species (maybe cats even)," vonHoldt said, BBC reported.

Elaine Ostrander of the National Institutes of Health said the study might be helpful in treating WBS in humans in the future. "This exciting observation highlights the utility of the dog as a genetic system informative for studies of human disease, as it shows how minor variants in critical genes in dogs result in major syndromic effects in humans," she said, BBC reported.

Many celebrities have been pictured with their pets, and some of those photographs went onto become famous. Following are some examples:

Barack Obama
In this handout from the The White House, former President Barack Obama plays football with the family dog Bo on the South Lawn of the White House in Washington, D.C., May 12, 2009. Getty Images/ Pete Souza
Prince William
In this handout image provided by Kensington Palace, Catherine, Duchess of Cambridge and Prince William, Duke of Cambridge pose for a photograph with their son, Prince George Alexander Louis of Cambridge, surrounded by Lupo, the couple's cocker spaniel, and Tilly the retriever (a Middleton family pet) in the garden of the Middleton family home in Bucklebury, Berkshire, England, in Aug. 2013. Getty Images/ Michael Middleton
Vladimir Putin
Russian President Vladimir Putin (R) pets his dog Kuni as Germany's Federal Chancellor Angela Merkel looks on as they address journalists after their working meeting at the Bocharov Ruchei residence in Sochi, January 21, 2007. Getty Images/ Axel Schmidt
George Bush
Former President George W. Bush waves as he arrives on the South Lawn of the White House with his dogs, Barney and Miss Beazley, in Washington, D.C. Aug. 13, 2006. Getty Images/ Evan Sisley-Pool
Paris Hilton
Grand Marshall Paris Hilton (L) and her mother Kathy Hilton ride on the float at the 2005 West Hollywood Gay Pride Parade, in Los Angeles, California, June 12, 2005. Getty Images/ Phil McCarten
Will Smith
Actor Will Smith poses with Abby, the dog from 'I Am Legend' as he is honored with a hand and footprint ceremony at Grauman's Chinese Theater in Los Angeles, California, Dec. 10, 2007. Getty Images/ Kevin Winter