The surface of Mars, by every measurement we've taken, is currently an inhospitable wasteland. Only dust devils roam its arid surface; the only water is permanent ice. Yet evidence that water once flowed and pooled on the planet's surface keeps mounting.

The presence of this liquid water means that Mars could have supported life as we know it… but one burning question remains: how in the heck was Mars warm enough for it, in the early days of the Solar System, when the young Sun was cooler and fainter?

New research has found an answer: geothermal heat could have risen from deep inside the planet - in which case, the best place for life to thrive would have been deep underground.

"Even if greenhouse gases like carbon dioxide and water vapor are pumped into the early Martian atmosphere in computer simulations, climate models still struggle to support a long-term warm and wet Mars," said planetary scientist Lujendra Ojha of Rutgers University-New Brunswick.

"I and my co-authors propose that the faint young Sun paradox may be reconciled, at least partly, if Mars had high geothermal heat in its past."

The faint young Sun paradox is the contradiction between the presence of liquid water in the early Solar System, and the faintness of the Sun. According to our understanding of stellar evolution, in the billion or so years after its formation 4.6 billion years ago, the Sun's heat and light would only have been about 70 percent of its current output.

Even today, Mars is a chilly place. It's 1.5 times Earth's distance from the Sun, and it only receives about 43 percent of the solar flux Earth does. Its average temperature is therefore much lower than Earth's - -63 degrees Celsius (-81 degrees Fahrenheit). Of course, that's just the average; the temperature does rise above the melting point of water, to about 30 degrees Celsius (although, because the atmospheric pressure on Mars is currently so low, ice sublimates rather than melting).

During the Noachian period on Mars, between around 4.1 and 3.7 billion years ago, water is thought to have been abundant on the planet's surface - yet climate models struggle to reach temperatures above -0.15 degrees Celsius.

The possibility that the planet heated itself from within, maintaining liquid groundwater long-term, is not a new notion. Hydrothermal minerals excavated from deep underground from cometary impacts, Noachian era-clays and evidence of groundwater diagenesis at a number of sites support internal heating models.

Here on Earth, we see the effects of geothermal heating beneath the ice sheets at high latitudes. The radioactive decay of elements such as uranium, potassium and thorium in the planet's crust generates heat that propagates through to the surface; not much, but when there's a thick sheet of ice preventing that heat from escaping, enough heat can be trapped to melt some of that ice, creating subglacial lakes.

So, Ojha and his team investigated the possibility that this could have occurred on Mars during the Noachian. They modelled the thermophysical evolution of ice, and estimated how much heat would be required to produce meltwater and subglacial lakes on a cold and frozen Mars.

Then, they compared this to various Mars datasets to determine whether this would have been feasible on Mars 4 billion years ago. And they found that the conditions to melt subsurface water would have been ubiquitous at the time, with volcanism and meteorite impacts possibly providing additional heat.

It's still possible that Mars' surface was warm and wet for a time, but that climate would not, the researchers said, have been stable long-term. Mars lost its magnetic field pretty early on in its history - sometime around the Noachian - and once the magnetic field was gone, the thick, Earth-like atmosphere wouldn't have lasted much longer.

Only at great depths, kept liquid by geothermal heating, could water have been stable long-term, the researcher said. If there was life at the surface, it could have followed the water inwards.

"At such depths, life could have been sustained by hydrothermal (heating) activity and rock-water reactions," Ojha said. "So, the subsurface may represent the longest-lived habitable environment on Mars."

Other research using sonar suggests that liquid water is still present underground on Mars today, although the reason it doesn't melt could be quite different. Scientists believe that underground Mars lakes could be extremely salty, since salinity lowers the freezing point of water.

And scientists have found evidence of mud volcanism on Mars, where subsurface wet sediments are pushed up and out from pressure underground. The water, of course, would sublimate once it reached the surface. But each piece of evidence is pointing to a very different sort of Mars once you crack the crust.

Three new missions to Mars launched in July of this year, due to arrive in February 2021. Perhaps we're very close to getting a lot more answers.

The research has been published in Science Advances.