The search for life on Mars is not an easy one. Not only is the red planet difficult to get to, it's deeply inhospitable to life as we know it.

However, there are places on Earth that could show us how life may have been able to survive on Mars – if not now, then at some other point during the planet's 4.5 billion-year history. Places like deserts, you might be thinking, and you'd be right; but there's more to Mars than deserts.

Scientists have investigated microbes that somehow survive in one of the most inhospitable places on Earth: a hot, toxic, acidic lake in a volcanic crater in Costa Rica. The ways these extremophile microbes adapt to their hellacious environment could show us how microbes might once have lived on a younger, wetter, more volcanic Mars.

"One of our key findings is that, within this extreme volcanic lake, we detected only a few types of microorganisms, yet a potential multitude of ways for them to survive," said astrobiologist Justin Wang of the University of Colorado Boulder.

"We believe they do this by surviving on the fringes of the lake when eruptions are occurring. This is when having a relatively wide array of genes would be useful."

The lake is known as Laguna Caliente (literally "hot lake") and it sits in the crater of the active Poás Volcano in Costa Rica. It's one of the most acidic lakes in the world, with a layer of liquid sulfur floating along the bottom, and often generating local acidic rains and fogs. In addition, the water is suffused with toxic metals. It's not exactly teeming with life.

Nevertheless, it's not entirely uninhabited, either. In 2013, a research team led by the University of Colorado Boulder found that a single species of microbe was surviving in the lake, from the genus Acidiphilium, or "acid lover", which are found living in acidic environments, and have a number of genes that allow them to do so.

The Poás Volcano continued to rumble and in 2017, it explosively erupted. Naturally, a team of researchers decided to revisit Laguna Caliente to see how the ongoing volcanic activity might have impacted the microbial community they identified in 2013, especially since volcanic eruptions had the potential to sterilize the lake.

The researchers took samples from the lake, sulfur clumps, and the sediment at the bottom of the lake, and subjected them to gene sequencing and metagenomic 'shotgun' sequencing to identify any organisms that might be lurking therein. Surprisingly, not only was Acidiphilium still present, so too was a small number of other microbial species.

Acidiphilium was the dominant species found inhabiting the lake, but all had significant survival adaptations. The team found that the bacteria had genes that might confer resistance to acid, as well as heat-resistant genes – vitally important in an environment that can reach boiling temperatures.

In addition, the organisms have a wide number of genes that allow them to metabolize various substances that might be toxic to others. These substances include sulfur, iron, and arsenic. They also have genes for carbon fixation, which allows plants to convert carbon into organic compounds; and seem to be able to process both simple and complex sugars, as well as bioplastic granules, which can be used in times of energy and carbon privation.

"We expected a lot of the genes that we found, but we didn't expect this many given the lake's low biodiversity," Wang said. "This was quite a surprise, but it is absolutely elegant. It makes sense that this is how life would adapt to living in an active volcanic crater lake."

Hydrothermal environments are of increasing interest to astrobiologists. The organisms that manage to thrive in these extreme places often don't rely on sunlight to survive, but harness chemical reactions to produce energy. This means that they could offer an analog for ecosystems that might be found in other locations far from the Sun, such as the hidden ocean ice moons of Saturn and Jupiter.

But scientists also believe that life on Earth may have started in a deep hydrothermal environment since it would be safe from the harsh ultraviolet radiation of the young Sun while containing all of the ingredients necessary for life to spark. Perhaps when Mars was younger, wetter, and more volcanically active, hydrothermal environments there could have sparked life too.

"Our research provides a framework for how 'Earth life' could have existed in hydrothermal environments on Mars," Wang said.

"But whether life ever existed on Mars and whether or not it resembles the microorganisms we have here is still a big question. We hope that our research steers the conversation to prioritize searching for signs of life in these environments."

The team's research has been published in Frontiers in Astrobiology.