These Pacific islands are famed for their odd collection of animal species, but scientists have only now begun to realise how the islands' ancient history led to present day diversity

About 14 million years ago, the tops of several volcanoes broke the surface of the Pacific Ocean, roughly 1,000km (about 600 miles) due west from the coast of Ecuador. These peaks formed an early Galápagos archipelago, which now consists of 19 larger volcanic islands and 120 smaller ones. The collective landmass provides home to an almost freakish ensemble of creatures such as giant tortoises, marine iguanas, and blue-footed boobies.

When Charles Darwin landed at San Cristóbal Island of the Galápagos in 1835, he compared the hot and dusty place to the infernos of hell. But his visit subsequently inspired his theory of evolution by natural selection and ultimately led him to write On the Origin of Species.

Since that date, the Galápagos have provided a scientific muse to biologists and geologists alike. But despite the discoveries that have been made in these natural laboratories, a shroud of mystery still surrounds them.

"We have a lot of suggestive evidence, but we don't have the details yet with respect to the evolution of life in Galápagos," says Dennis Geist, a geologist at the University of Idaho, "and the devil is in the details."

The Galápagos archipelago is home to ecosystems and animals – such as the Galápagos fur seals and flightless cormorants – that do not exist anywhere else in the world. To understand just how this uniqueness came about, scientists have started to look beyond the biology to the geological history of the islands.

It's likely that sea birds from the surrounding waters arrived first

The Galápagos Islands owe their origins to a "hot spot", a point where the magma from the Earth's interior bubbles up through the crust, forming volcanoes on the ocean floor. The hot spot is stationary, but the volcanoes it forms are not. They sit on the Nazca tectonic plate, which travels from west to east at the rate of about 4cm per year. This movement means that the older islands, some of which have now totally eroded below the water, lie well to the east. The youngest island, Fernandina, currently still sits on top of the hot spot.

"The Galápagos act as this large conveyor belt of islands, where you create new islands and life, and animals and plants migrate from the older islands," says Eric Mittelstaedt, a geologist at the University of Idaho. "They live there until that island stops growing and starts to erode and sink into the ocean, and then they move to the next set of islands."

At the beginning, the very first islands existed merely as inhospitable masses of volcanic lava. But then the "mountains" interacted with the atmosphere to produce rain. Over thousands of years, the rain eroded the basaltic lava to form soil. The advent of soil was a signal for life to begin.

Wind would have carried the spores of ferns, mosses and lichens to the islands, along with small insects and even tiny snails. Then came birds with more bounty.

"It's likely that sea birds from the surrounding waters arrived first, carrying microorganisms because they are so abundant, small and disperse so well," says Peter Grant, an emeritus professor of ecology and evolutionary biology at Princeton University. "Seeds of plants may have 'hitched' a ride on the seabirds, or been blown from South America, or floated on the sea."

Ocean animals – including the ancestors of sea lions, sea turtles or penguins – probably swam to the islands, whereas many of the reptiles and small mammals – such as rice rats – would have floated from the mainland on rafts of vegetation.

The reptiles were better suited than mammals to deal with the harsh, salty and sunny conditions at sea, explaining why now only six native species of mammal live on the Galápagos Islands. These include the Galápagos fur seal and the Galápagos sea lion.

Also unique to the islands is the Galápagos giant tortoise, the largest living species of tortoise, which can weigh up to 417kg (900lb).

Depending on where you are in the archipelago, it could be a very tropical place or a very cold-water place

But it is not just the islands' isolation and volcanic nature that leads to their special brand of biology. The uniqueness of the biodiversity and ecosystems can be tied to the fact that the islands lie directly on the equator and slap-bang in the path of an express train of an ocean current, known as the Equatorial Undercurrent. This jet-like current lies just below the sea surface to 100m deep, and flows from west to east at speeds of more than a metre per second.

"It's just a coincidence that the Galápagos happens to be on the equator and big enough to impact the current," says Kristopher Karnauskas, a professor of atmospheric and oceanic science at the University of Colorado. "But that has led to the development of an ecosystem that's also like nowhere else on Earth."

As the current smacks into the western islands, it pushes the nutrient-dense cooler water from the deeper ocean upwards. And once the nutrients, as yet untouched by any ocean animal, reach the sunlit zone, photosynthesis can start to do its work, Karnauskas says. This productivity fuels marine life on the islands, and the coolness of the water allows for an ecosystem that would not normally be seen in tropical regions.

"Depending on where you are in the archipelago, it could be a very tropical place or a very cold-water place," Karnauskas says.

The cooler ocean temperatures on the west side of the islands provide food and good living temperatures for Galápagos penguins, 90% of which live on the west side of the islands of Isabela and Fernandina. "They're there because that's where the food is, and they are thriving because they're a cold-water species," Karnauskas says. "But on the eastern side, it's much more tropical."

Karnauskas and Mittelstaedt hypothesised that the initial collision of the Equatorial Undercurrent with the islands caused a biological explosion on the Galápagos. The event would have marked a dramatic shift in the islands' ecosystems and their potential to sustain the varied life that exists there today, Karnauskas says. "The whole island ecosystem is really jumping off of this upwelling source."

Since the islands first emerged, sea levels have moved down, up, down and up again

To investigate the timing of this event, the scientists developed two separate models. The first of these models ran backwards in time, reconstructing the size and shape of the islands over millions of years. Then, using this information, for each instance in time and the corresponding configuration of the islands, the scientists simulated the currents and temperature patterns in the surrounding oceans.

The models implied that, two million years ago, the Equatorial Undercurrent passed through the region. But by 1.5 million years ago, an island blocked its passage. The team then looked to data from sediment cores, sampled from the sea floor near the Galápagos Islands and South America. These cores chart changes in sea surface temperatures over millions of years. The scientists found that ocean temperatures had changed drastically about 1.6 million years ago.

"Somewhere around that time, there was a change in the islands that caused what we see in the palaeoclimate data," Karnauskas says. "It turned out to be a completely independent verification of what we found in our models."

It would have been around this time that the Galápagos Islands finally got big enough to block the Undercurrent. "The ecosystem implications were pretty direct," Karnauskas says. "The biology would have started to thrive at that point."

The event certainly would have impacted the ecology and evolution of marine organisms, and it may have altered conditions for the colonisation of new plant and animal species on land, Grant says. However, if this collision, which probably started over a period of about 20,000 years, kick-started the evolution of life in the Galápagos, other geological events have continued to shape its course.

I realised that some of these islands must have been connected at some point

Since the islands first emerged, sea levels have moved down, up, down and up again. "It's bounced around like that about 30 times over the last three million years," Geist says.

These fluctuations would have dramatically modified the geography of the Galápagos, and in turn have had consequences on the islands' biology, according to a 2014 paper by Jason Ali at the University of Hong Kong and Jonathan Aitchison at the University of Sydney, Australia.

By studying sea floor charts of the area, Ali noticed the waters were relatively shallow in the centre of the archipelago, perhaps only 200m deep. In their study, the scientists estimated that the sea level would have been 144m below its current level around 20,000 years ago. Stepping back even further in time to 630,000 years ago, Ali estimates sea levels would have been 210m below the current level. That is lower than the sea floor in some parts of the archipelago.

"I realised that some of these islands must have been connected at some point," Ali says, "and it would have been possible to walk between them." The effective bridges between the islands would have widened the range of land-bound animals like land iguanas, leaf-toed geckos and racer snakes.

When the scientists looked closer, they found that the islands that had once been joined shared the same biology, whereas the peripheral islands had their own biology. "It's only when you've got the geological background that you could make that connection," Ali says.

Eruptions happen every two or three years on Fernandina

Two distinct species of snakes occupy the core islands of the archipelago. The scientists believe that their common ancestor was able to slither between the islands some 138,000 years ago.

Then, when the sea levels rose again, the two isolated populations evolved into Pseudalsophis slevini to the west and P. dorsalis to the east.

"In general, isolation of organisms on islands allows them to adapt to local circumstances," says Grant. "Removing the isolation, when sea level falls and islands become joined, allows the opposite – a mixing of previously-separated populations."

Finally, while volcanic eruptions provided a base for life on the Galápagos, by birthing the islands, volcanoes have continued to shape the ecosystems. Eruptions happen every two or three years on Fernandina, spurting out lava that flows down the hillsides. "This can kill off some species where the lava flows directly, but it can also split animals into two groups, as they tend not to cross these lava flows," Mittelstaedt says.

On the islands, a distinct species of tortoise usually lives around each volcano. Currently the Alcedo volcano is home to the largest population of Galápagos tortoises, an estimated 3,000-5,000 animals.

But when biologists looked at the genetic variability of the Alcedo tortoises, they discovered a genetic bottleneck, or narrowing of diversity, about 88,000 years ago. Geist used potassium-argon dating to estimate that Alcedo erupted, quite explosively, around that time.

"It seemed to have caused near-extinction of one of the species of tortoises, and basically there was a single 'Eve' tortoise left after this cataclysm," Geist says. The biologists estimate 91% of all the tortoises living on Alcedo descend from this lucky female tortoise.

In the last few centuries, visitors have introduced fire ants, goats and blackberries

"By dating, describing and interpreting geophysical events, geologists can help biologists understand environments in the past, how they changed, and hence how they might have influenced animals, plants and microbes," Grant says.

Geological impacts on the Galápagos ecosystem are still ongoing, and sometimes obvious even on a small timescale. In 2015, the eruption of Wolf volcano, the highest point of the islands, potentially threatened the world's only population of pink iguanas. But when it comes to how the ecosystems will continue to change, humans appear to be the major influence.

In the last few centuries, visitors have introduced fire ants, goats and blackberries, all of which have caused harm to some of the long-established species in the Galápagos. Rising sea levels, due to anthropogenic climate change, also have the potential to cause extinctions.

"Looking backwards, the geology and biology are intimately related," Geist says. "But looking forward, the geologic effects are unlikely to be very important, even on a human time scale, compared to the human-induced impacts on the ecosystems."

Join over six 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 Capital, Culture, Earth Future and Travel, delivered to your inbox every Friday.