Despite differences in coloring, eastern gray squirrels and so-called black squirrels are actually members of the same species. As a new study published in the journal BMC Evolutionary Biology explains, squirrels sporting black coats owe their distinctive appearance to interbreeding between gray and fox squirrels, which carry a faulty pigment gene known to give some members of the predominantly reddish-brown species darker fur. This gene variant, passed from fox to gray squirrels via mating, is the same mutation responsible for black squirrels’ coloring.

“People have spotted ‘mixed species’ mating chases, with a mix of grey and fox squirrels [pursuing] a female,” lead author Helen McRobie of England’s Anglia Ruskin University says in a press release. “The most likely explanation for the black version of the gene being found in the grey squirrel is that a male black fox squirrel mated with a female grey squirrel.”

To determine the origins of squirrel melanism, or dark coloration, McRobie and colleagues from Cambridge University and the Virginia Museum of Natural History extracted DNA from gray and fox squirrel specimens found in North America.

Per Live Science’s Rafi Letzter, the researchers pinpointed the emergence of black fur to a gray squirrel allele called MC1R∆24; this gene variant is “identical” to an allele found in darker-hued fox squirrels, leading the team to theorize that the color-changing mutation originated in fox squirrels but spread to gray squirrels through interbreeding. Although genetic similarities between fox and black squirrels appear to support this hypothesis, it’s worth noting that the scientists did not entirely rule out the possibility of the allele starting out in gray squirrels and later passing on to fox squirrels.

The new study builds on McRobie’s earlier findings regarding squirrel coloring. Published in FEBS Letters in 2014, the research demonstrated how a “tiny molecular switch”—in other words, a pigment gene missing a piece of DNA—can determine the shade of a gray squirrel’s coat. Thanks to this latest round of testing, scientists now have a better understanding of the faulty gene’s origins.

According to Mental Floss’ Jake Rossen, black squirrels are relatively rare, constituting just one in 10,000 of the seemingly ubiquitous rodents. Today, the animals are seen in both their native home of North America, including sites as wide-ranging as Ontario, Washington, D.C. and Ohio, and the United Kingdom. (As the Guardian’s Patrick Barkham writes, black squirrels, imported to the U.K. for use in private zoos, first escaped into the wild in 1912 and are now regularly spotted across southeastern England.)

Black squirrels’ continued presence in North America may stem from the thermal advantage offered by their dark-colored coats. By helping the gray squirrel variant “inhabit regions with extremely cold winters,” McRobie concludes, black fur “may have contributed to the expansion of the grey squirrel’s range during the past 11,000 years, following the end of the most recent ice age, helping them spread further north into Canada.”