UK scientists have shown how astronauts on the Moon or Mars could one day mine for important metals using bacteria.
In a first-of-its-kind experiment on the International Space Station (ISS), microbes digested rock to release rare-Earth elements (REEs).
REEs are incorporated into electronics and alloys, in particular.
The researchers tell the journal Nature Communications that bio-mining could help make future space exploration become more sustainable.
At the moment, everything required to survive on another world has to be carried from Earth - from the air an astronaut would breathe to any materials they might need for repairs.
Transporting all that mass is energy-intensive and expensive, which is why there is now increasing focus on trying to find ways to use resources already in place.
"Wherever you are in space, whether you're building a settlement on asteroids, the Moon or Mars - you're going to need elements to build your civilisation," said Prof Charles Cockell from the UK Centre for Astrobiology at the University of Edinburgh.
"What our BioRock experiment has shown is that bio-mining is just one way in which we might go about extracting useful elements from rocks to support a long-term human presence beyond the Earth."
Prof Cockell's team has developed small bio-reactors. These are essentially small boxes containing basalt rock and a community of microbes known to leach metals from minerals.
The reactors were sent to the ISS and placed in a centrifuge where they were spun at different speeds to simulate gravity on the Earth and on Mars. A third box was allowed to experience the full, free-floating "zero-G" environment of the orbiting lab.
The team wanted to find out if micro-organisms that ordinarily pull REEs out of rock here on the ground will also do the same in space.
This wasn't obvious. Reduced gravity can stress microbes, making them behave in different ways. And for two species of bacteria in the BioRock experiment, their readiness to remove the metals was much reduced.
But for an organism called Sphingomonas desiccabilis - it was unaffected, and happily pulled multiple REEs from the basalt, including neodymium, cerium and lanthanum.
"This is the first time in space that anyone has deliberately removed an economically interesting element from an extraterrestrial analogue material like basalt," said Prof Cockell. "It's really the first mining experiment in space, if you like. We didn't actually create economically useful amounts of rare-Earth elements, but we demonstrated the principle," he told BBC News.
About 20% of the world's copper and gold is currently extracted with the aid of microbial processes.
There's been much talk in recent years about mining planets and asteroids for raw materials that could then be brought back to Earth.
Prof Cockell can't see the economic case for this just yet; it would still be cheaper to prospect for - and extract - ores here on Earth, he says. But the argument for utilisation of in-situ resources on other worlds is a compelling one, he believes.
US space agency (Nasa) astronauts will attempt to use buried ice for drinking water when they return to the Moon later this decade. And as soon as next year, the American rover Perseverance will run an experiment that seeks to make oxygen from Mars' carbon dioxide atmosphere - a potential game-changer for any human settlement on the Red Planet.
Also, just this week, the European Space Agency (Esa) gave a contract to the UK company Metalysis to develop its process for pulling oxygen from Moon dust while at the same time yielding aluminium, iron and other metal powders.
"The oxygen that we can liberate could be used as a propellant or to sustain life, or a presence on the Moon. And the metal can be used to build different kinds of structures," Ian Mellor, managing director at Metalysis, told the BBC.
As for the Edinburgh work - ways are being sought to improve efficiency.
BioRock on the ISS will soon be followed by BioAsteroid - a repeat of the reactor experiment but with crushed-up asteroid material rather than the blocks of Icelandic volcanic rock used in the first study.
Prof Cockell said he also expected scientists at some point to look at how mining bacteria could be engineered to raise their productivity of useful products.
BioRock received funding from Esa and the UK Space Agency.