The Red Planet is home to some pretty nasty conditions: extreme cold temperatures of about –80 degrees Fahrenheit, an atmosphere that doesn’t provide much protection from the cold, and a very different definition of water. It likely won’t be harboring life anytime soon, but questions still remain about whether it once had lifeforms.

A new study published in the journal Nature Astronomy finds that roughly four billion years ago, Mars could have been home to an underground world of microscopic organisms. However, if simple life like microbes existed, they “might actually commonly cause its own demise,” the study’s lead author, Boris Sauterey, now a post-doctoral researcher at Sorbonne University, told the Associated Press. He added that the results, “are a bit gloomy, but I think they are also very stimulating. They challenge us to rethink the way a biosphere and its planet interact.”

[Related: 5 new insights about Mars from Perseverance’s rocky roving.]

Early on in its life, Mars likely had an atmosphere that was much denser than the one it has today, and the planet itself was possibly even filled with water. According to Regis Ferrière, a lead author on the study and an evolutionary biologist at the University of Arizona, the carbon dioxide and hydrogen in this ancient atmosphere could have created a temperate climate that allowed water to flow and, possibly, microbial life to thrive.

For a hypothetical simulation of what Mars may have looked like billions of years ago, the team created a model of Mars’ crust, atmosphere, and climate and paired it with an ecological model of a group of microbes that we would find on Earth that metabolize hydrogen and carbon dioxide. “Our goal was to make a model of the Martian crust with its mix of rock and salty water, let gases from the atmosphere diffuse into the ground, and see whether methanogens could live with that,” Ferrière said in a press release. “And the answer is, generally speaking, yes, these microbes could have made a living in the planet’s crust.”

Methanogenic microbes live by converting chemical energy from their environment and releasing methane as a waste product, the same way that humans convert the oxygen they breathe into carbon dioxide. They thrive in the most extreme habitats on Earths like hydrothermal vents along fissures in the ocean floor and can support entire ecosystems that are adapted to living with crushing water pressures, near-freezing temperatures, and total darkness.

The team theorized that Mars’s methane-releasing microbes might been living just beneath the surface of the planet, with a few inches of dirt protecting them against radiation. According to Sauterey, any spot on Mars that was free of ice could have been swimming with these microbes, just like on Earth.

However, so much hydrogen being sucked out of the thin and carbon dioxide-rich atmosphere would have put the planet’s protective layer in jeopardy. As the amount of hydrogen in the atmosphere depleted, the temperature on the planet plummeted and any of the microbes at or near the Martian surface probably would have gone deeper in an attempt to survive.

[Related: NASA’s Perseverance rover is on a hunt for microbes on Mars.]

“We think Mars may have been a little cooler than Earth at the time, but not nearly as cold as it is now, with average temperatures hovering most likely above the freezing point of water,” Ferrière said. “While current Mars has been described as an ice cube covered in dust, we imagine early Mars as a rocky planet with a porous crust, soaked in liquid water that likely formed lakes and rivers, perhaps even seas or oceans.”

The team also applied models that predict the temperatures at the surface and crust to simulate the weather conditions faced by early Martian lifeforms. They combined that with a separate ecosystem model to predict whether or not life of this kind would have been able to survive in this environment over time.

“The problem these microbes would have then faced is that Mars’ atmosphere basically disappeared, completely thinned, so their energy source would have vanished and they would have had to find an alternate source of energy,” Sauterey said in a press release. “In addition to that, the temperature would have dropped significantly, and they would have had to go much deeper into the crust. For the moment, it is very difficult to say how long Mars would have remained habitable.”

The researchers suggest that the best places to look for evidence of this past life is Hellas Planitia (a still unexplored area) and the Jezero Crater. NASA’s Perseverance Rover is collecting rocks in the crater on the northwestern side of Isidis Planitia that will be returned to Earth within the next decade.