The critically endangered Devils Hole pupfish of Death Valley have long been considered the struggling survivors of the end of the last ice age 13,000 years ago – trapped in an dwindling watering hole in the midst of the most hellish desert on Earth.

But a new genetic analysis confirms that the fish known to science as Cyprinodon diabolis has managed the diabolically impossible: it seems to have arrived at Devil's Hole more recently and somehow mixed with other pupfish species of other desert springs within the last few centuries.

This apparently miraculous feat, while being very mysterious in itself, could actually demystify another inexplicable fact about the Devil's Hole minions that has long bedeviled scientists: how such a small population of fish living in a body of water the length and width of a couple of school buses could have survived for thousands of years without succumbing to inbreeding or the occasional mega drought.

Endangered Pupfish Could Vanish in 30 Years

“It's one of the most ridiculous fish habitats in the world,” said Christopher Martin of the University of North Carolina, Chapel Hill, the lead author of the new study which appears online in the Proceedings of the Royal Society B.

Indeed, at 10 feet wide and 70 feet long (3.5 by 22 meters) the steep-sided Devil's Hole is the smallest range of any vertebrate in the world.

That same small range means it would not take much to wipe the species out, which is why Devil's Hole is fenced off from the public and guarded by the National Park Service. But the latest gene sequencing technology is changing the story of these fish, according to Martin.

And while they are still a critically endangered animal, genes have revealed that they aren't exactly the lonely remnants of the ice age they were long thought to be.

“We estimate that Devils Hole was colonized by pupfish between 105 and 830 years ago,” report Martin and his colleagues.

That's based on their genetic sequencing which mapped out more than 13,000 genes and compared them to nearby pupfish species to determine how far the species had diverged from each other.

Photos: Biofluorescent Fish Light Up the Deep

To estimate the time the species had been separated, they calibrated the rate at which the genes naturally change – the mutation rate – by comparing it to another, similar, pupfish species with a better-known mutation rate.

Devil's Hole is literally a hole in the ground, but it's the entire habitat of the Devil's Hole Pupfish -- the smallest range of any vertebrate on Earth. USGS

To the eye, the Devil's Hole pupfish is distinct from its neighbors. It's known for its missing pelvic fins, bigger eyes, and other characteristics that fit it to its unusual habitat. But the genetics indicate that not only is the fish relatively new to Devil's Hole, but that some of its genetic material has flowed back into the related pupfish of other watering holes.

But how did this impish little fish manage it? Perhaps, Martin offered, a rare duck visited Devil's Hole and inadvertently carried a few sticky pupfish eggs in, and decades or centuries later another carried some away. Or maybe it was humans – Native Americans, in particular – to whom the fish were a precious food source.

It's unlikely we'll ever know. But however they got there, it's now clear the pupfish adapted quickly to their new environment.

Photos: Top Most Threatened Species

“Evolution can happen in decades to a few hundred years,” said Craig Stockwell of North Dakota State University. “So it is possible that pupfish evolved shortly after colonizing Devils Hole.”

Stockwell and his colleagues own research, published in 2015, concluded that there was a 2 percent probability of Devil's Hole pupfish surviving for 10,000 years and a 95 percent probability of them persisting for 133 years. The genetic sequencing would seem to agree.

There is another good reason to believe that fish could have changed rapidly after colonizing Devil's Hole, said Stockwell. Previous research had subjected another local species of pupfish to conditions similar to Devils Hole and found that the fish very rapidly took on traits that were similar to the Devils Hole pupfish.

“This suggests plasticity,” said Stockwell.

As to how they got there, he said it's not so important scientifically, although it does add a certain mystique to what is already a devilishly interesting species.