In this May 28, 2014 file photo European Space Agency's astronaut Alexander Gerst, crew member of the mission to the International Space Station, ISS, waves during inspection of his space suit prior to the launch of the Soyuz-FG rocket at the Russian leased Baikonur cosmodrome, Kazakhstan. (AP Photo/Dmitry Lovetsky, file)

Humans could set foot on Mars within decades if they wanted to, according to the German astronaut who has been tapped to become his country's first commander of the International Space Station.

Alexander Gerst said the space station offers a unique opportunity to test the technology needed to explore other planets, especially if its lifetime is extended beyond 2020.

"It is very clear to me that those manned missions to the moon and Mars, human missions, will happen," he told The Associated Press in an interview at the European Space Agency's astronaut training center in Cologne, Germany. "But we need the decision as a society. And once we do that we are ready to go, basically."

Gerst said the recent Hollywood movie "The Martian"—starring Matt Damon as an astronaut fending for himself on the red planet—offers a realistic glimpse of the not-too-distant future.

"It shows us what we can possibly reach in a few years' time," he said. "I'm actually quite excited by the fact that us humans, we could fly to Mars, and maybe you and I will live to see it."

The 40-year-old volcanologist—an expert on volcanos, not the planet Vulcan from Star Trek—is scheduled to take command of the space station in May 2018, four years after his first mission, it was announced Wednesday.

An undated photo provided by NASA shows the International Space Station in orbit. On Monday, May 16, 2016, the International Space Station made its 100,000th orbit circling of the world. NASA says these 100,000 orbits are akin to traveling more than 2.6 billion miles. (NASA via AP)

NASA aims to send astronauts to Mars in the 2030s. Astronauts have been living continuously aboard the 250-mile (402-kilometer) -high International Space Station since 2000. This month, the space station hit the milestone of 100,000 orbits around Earth—the equivalent of 10 round trips to Mars, or almost one way to Neptune.

Following NASA's longest human spaceflight yet, American Scott Kelly returned in March from a 340-day voyage with Russian Mikhail Kornienko. Scientists hope the results from wide-ranging medical tests will offer guidance on how the body will cope during the much longer Mars expeditions.

Gerst will be the second European Space Agency astronaut in charge of the orbital outpost, after Belgian pilot Frank De Winne, reflecting Europe's growing interest in space. German Chancellor Angela Merkel, who was present for the announcement and who is a scientist by training, said recently it was "right and important" that space exploration should play a key important role in her country's high-tech strategy.

The European Space Agency saw its budget increase almost 20 percent this year to 5.25 billion euros ($5.96 billion) and the agency is on course to activate Europe's satellite navigation system Galileo—a rival to the American GPS, Russia's Glonass and China's Beidou systems—this decade.

Earlier this year, ESA chief Jan Woerner suggested establishing a village on the moon once the International Space Station reaches the end of its lifetime. There are no concrete plans for this yet, though, and experts say the space station hasn't outlived its usefulness—over 100 experiments are conducted during each mission to the space station.

Gerst said the flying laboratory can help test whether humans are physically and psychologically capable of spending long periods of time in deep space and also how to conserve precious resources on Earth.

"In this year, we decide whether to continue the International Space Station until 2024," he said. "Whether Europe is part of that and whether we will use that investment that we made in the past. So it is important not to stop investing in this field."

Explore further Image: Space suit vacuum test

© 2016 The Associated Press. All rights reserved.