Mars is very much en vogue right now. NASA is focused on exploring Mars, SpaceX CEO Elon Musk wants to colonize Mars, and astronomers all around the world want to learn more about Earth’s nearest neighbor. The discovery earlier this month that the planet is hiding massive water ice reserves just beneath its surface could have far-reaching ramifications, possibly giving future humans on Mars easy access to water supplies. Of course, humans would need more than water to survive on Mars.

Scientists continue to explore ways of building human habitats on Mars that are capable of sustaining life for long stretches of time. Of course, no habitat can sustain life without power, and a lack of fuel sources on Mars is a big roadblock. Moreover, sources of portable power will be needed if astronauts on Mars have any hope of embarking on meaningful expeditions. NASA is exploring a number of different solutions to these issues, and on Thursday evening it announced successful tests of machines that may provide the ideal solution.

A team of researchers from NASA, Los Alamos National Laboratory and the Department of Energy announced during a press conference that they have successfully tested a system that can provide power and generate fuel on Mars.

Getting a manned spacecraft to Mars, sustaining a habitat for a long-term stay on the planet, and enabling the manned craft to return home to Earth requires a massive amount of fuel. Hauling that much fuel from Earth to Mars in a manned spacecraft isn’t feasible, which means astronauts must have a way to create fuel on the red planet. A number of different solutions are in testing, of course, but one in particular could be the key.

NASA on Thursday unveiled a device called Kilopower, a compact nuclear reactor capable of reliably generating power. In a guest post on Space.com, the Department of Energy’s Kilopower project lead Patrick McClure and Los Alamos National Laboratory’s chief reactor designer David Poston explained how the solution works.

“The brilliance of Kilopower is its simplicity: With few moving parts, it uses heat-pipe technology, invented at Los Alamos way back in 1963, to power a Stirling engine,” the two wrote. “Here’s how it works: The sealed tube in the heat pipe circulates a fluid around the reactor, picking up the heat and carrying it to the Stirling engine. There, the heat energy pressurizes gas to drive a piston coupled to a motor that generates electricity. Using the two devices in tandem creates a simple, reliable electric power supply that can be adapted for space applications, including human exploration and space science missions to outer planetary bodies like the moons of Jupiter and Saturn.”

The researchers have created different versions of the portable Kilopower reactor that generate different amounts of power. They range from 1 kilowatt, which they say is only enough to power a household toaster, to 10 kilowatts in size. According to McClure and Poston, about 40 kW would be needed to effectively run a habitat on Mars and generate fuel.

The team continued, “The advantages of nuclear power are that it’s lightweight and reliable. Other energy sources either require too much fuel — making them too heavy — or can’t be counted on in all seasons. Solar power, for example, relies on consistent sunlight. That’s something that’s lacking on Mars, since it depends on the time of day, the time of year, the location on the planet surface and the severity of the planet’s dust storms, which can last for months. Nuclear energy operates regardless of the weather or time of day. Also, the number of solar panels and batteries required would once again make the rocket to Mars extremely heavy — requiring more fuel.”

Kilopower tests have gone smoothly so far, and NASA plans to conduct full-power tests of the system beginning in March.