Worshipped for centuries in Japan as a divine messenger and protector of farmland, the Japanese wolf disappeared from the archipelago in the early 20th century after its population was decimated by disease and humans hunting them down in the name of defending livestock.

Its tragic fate, however, along with the lingering mystery over its true identity and even reports of modern-day sightings, has kept the beast alive in the minds of many. Now, a new study says the legendary animal may offer the key to understanding the origins of man’s best friend.

The Japanese wolf (Canis lupus hodophilax) is the closest relative to the ancestors of dogs, more so than any other gray wolf population, according to Yohey Terai, an evolutionary biologist at the Graduate University for Advanced Studies in Kanagawa Prefecture who led the research.