Japanese scientists are preparing an unmanned mission to Mars's moons to collect samples that could help explain how the Solar System formed and how the building blocks of life reached the rocky planets.

The Martian Moons eXploration (MMX) probe is due to lift off aboard Japan's flagship H3 rocket from the Tanegashima Space Center on Tuesday at 4:41 am local time (1941 GMT on Monday), the Japan Aerospace Exploration Agency, JAXA, said.

The spacecraft is expected to reach Mars about a year later. It will orbit the moon Phobos for up to three years, then land and collect at least 10 grams of surface material.

A small rover named IDEFIX, after the dog in the Asterix comics, will scout the surface first to help engineers choose a safe place to touch down.

Project manager Yasuhiro Kawakatsu said the sampling from Phobos would be a world first and would amount to the first round trip to the Martian system.

JAXA also wants to test whether Phobos could serve as a 'natural space station' for future crewed missions to Mars, by setting out what a round trip would require.

MMX is a collaboration with NASA, the European Space Agency, France's National Centre for Space Studies and Germany's Aerospace Center, along with about 20 universities and technology companies.

After leaving Phobos, the probe will observe Mars's other moon, Deimos, without landing, before heading back to Earth.

Japan has earlier experience with sample returns: its Hayabusa-2 probe brought 5.4 grams of rock and dust from a distant asteroid in 2020. China's Tianwen-3 aims to return material from Mars itself as early as 2031.