A tiny species of fish can claim some of the most unenviable of all records.

The so-called Devils hole pupfish survives within one of the driest places in the world, in the heart of the Mojave desert in the US.

Each fish is less than one inch-long (2.5cm), and perhaps fewer than 50 individuals survive.

Even more remarkably, every member of this species has existed in the wild, since they first appeared thousands of years ago, within an area no bigger than the living room in your house.

Which makes the Devils hole pupfish perhaps the rarest of all fish, the world’s loneliest species, and the most isolated animal species on Earth.

And now scientists believe they have finally established where it came from.

These records have helped make this specific species of pupfish a true scientific and conservation icon.

The fish lives in a single limestone cavern, known as Devils Hole in Nye County, Nevada.

Although the cavern opens to the air, the water inside is not connected to any other source.

How did the Devils Hole pupfish come to live inside Devils Hole?

Some 15 metres below the cavern’s opening, is a pool of water, within which every wild Devils pupfish has ever lived.

At one end of this pool is a small limestone shelf, measuring just 3 metres by 6 metres. This shelf is the fish’s only known feeding and spawning ground.

As a result, the pupfish has the smallest geographic range of any vertebrate species.

The fish also survives continually harsh conditions; a constant temperature of 32-33 degrees Celsius, low levels of oxygen, and sporadic changes in water levels.

The fish’s extreme rarity led to it, in 1966, being one of the first species listed under the original US Endangered Species Preservation Act, and the US Supreme Court once ruled in the fish’s favour, banning the pumping of nearby groundwater, that may have threatened its habitat and existence. That ruling strengthened the legal protection later offered to a range of endangered species.

However, such rarity raises a fundamental question; how did the Devils Hole pupfish come to live inside Devils Hole?

Experts have always thought it somehow arrived thousands of years ago, evolving into the unique species it is today.

But doubts have recently been cast on the unique heritage, and therefore iconic status, of the fish.

The fish colonised the limestone cavern far earlier than anyone thought

Studies into the geology of the cave, and appearance of the fish species, led some to suggest that native Indians may have introduced the fish to the cave relatively recently.

Other ideas are that related species of pupfish living in Death Valley may have somehow journeyed overland to colonise the cavern, been carried there by birds, or found a subterranean route in.

Each essentially proposed the Devils Hole pupfish did not deserve its exceptional reputation.

Now an answer is provided by a new study published in the journal Molecular Ecology, by a team of US researchers, led by Ismail Saglam and Michael Miller of the University of California, Davis, US.

They examined the genetic history of the Devils Hole pupfish (Cyprinodon diabolis) and compared it to two other closely-related pupfish species, the Owens pupfish (C. radiosus) and Ash Meadows Amargosa pupfish (C. nevadensis mionectes), to find out when they diverged.

They were surprised to learn that the Devils Hole pupfish split from the other species 50,000 to 80,000 years ago, more than 40,000 to 60,000 years earlier than previous evidence suggested.

That was also the same time that Devils Hole itself appeared in the desert, 50,000 to 60,000 years ago.

The pupfish population in Devils Hole is on the brink of extinction, with numbers falling to as low as 30

The “pupfish colonised and have survived in Devils Hole since the cavern opened to the surface,” say the researchers.

In short, the fish colonised the limestone cavern far earlier than anyone thought.

What’s more, the Devils Hole pupfish and Devils Hole cavern may have appeared at the same time, the fish surviving inside almost immediately after it opened up.

“The two events, [the] colonisation and collapse of the cavern's roof, could have been caused by a common, yet unidentified, geologic event,” they suggest.

The new findings have confirmed the rarity and iconic status of the fish, which has survived in complete isolation for sixty millennia.

“Our results clearly indicate Devils Hole pupfish were isolated in Devils Hole for even longer than the previously assumed 20,000 years ago, most likely since the cavern opened to the surface 60,000 years ago.”

Conserving an icon

The findings may lend yet more weight to efforts to conserve the species.

“The fate of the Devils Hole pupfish is far from certain,” state the scientists in their research paper.

Efforts to breed the fish outside the cavern have been unsuccessful.

“Today, the pupfish population in Devils Hole is on the brink of extinction, with numbers falling to as low as 30 from sizes around 400 in the 1970s,” say the researchers, while human demands for fresh water in the region and climate change also threaten its habitat.

Matt Walker is BBC Earth's editor. He is @byMJWalker on Twitter.

Join over five million BBC Earth fans by liking us on Facebook, or follow us on Twitter and Instagram.

If you liked this story, sign up for the weekly bbc.com features newsletter called "If You Only Read 6 Things This Week". A handpicked selection of stories from BBC Future, Earth, Culture, Capital, Travel and Autos, delivered to your inbox every Friday.