NASA wants to manipulate the DNA of its astronauts headed to Mars to protect them from cancer-causing cosmic radiation.

NASA plans to send its first manned mission to Mars between 2030 and 2040 but still faces a number of obstacles before then.

The Mars-bound astronauts will be exposed to high-energy particles and NASA is looking at ways to repair the damage this would do to their DNA. This could include actually altering the astronauts’ genes and genetic activity.

When humans travel beyond the Earth’s magnetic field for prolonged periods, they are exposed to charged atomic nuclei that can rip through DNA and increase the risk of both cancer and dementia.

Watch astronauts repair ISS robot arm in daring spacewalk - LIVE: https://t.co/uxy7ltjR8Ipic.twitter.com/GBZ43y5FqH — RT (@RT_com) October 5, 2017

According to a 2014 study on space radiation risks, astronauts would be exposed to levels of galactic cosmic ray radiation that would exceed their lifetime limit – within just two years. Astronauts headed to Mars would be exposed to radiation for at least this time period.

The astronauts could have armor or an electromagnetic force field to protect them, but this is not very practical, Douglas Terrier, NASA’s acting chief technologist, told the Times.

“We’re looking at a range of things, from drug therapies, and those seem to be quite promising, to more extreme things like epigenetic modification,” Terrier said. “I think those have a lot of ethical consequences so they’re still in the experimental thought stages.”

#Mars once retained water for ‘several thousand years’ with help of explosive methane gas bursts – study https://t.co/YZ6TZurXJI#spacepic.twitter.com/DXTqikQSyn — RT (@RT_com) October 4, 2017

Epigenetic modifications would involve altering the way genes are read without changing the actual DNA code. This would be achieved by altering chemicals that control gene volumes so their activity could be silenced or amplified in a given situation.

Genes could also be changed to boost the cell resilience. This way, cancer and radiation-related issues could be prevented from developing.

READ MORE: Space Race 2.0: SpaceX rival Lockheed Martin reveals plan for Mars (PICTURES, VIDEO)

The spaceship to Mars would be run by a “strong” artificial intelligence program that could identify diseases and direct robotic surgery, Terrier said. This is necessary because of the 20-minute delay in communicating with Earth.

The 100 million-mile journey to Mars could be sped up with the use of sun-powered ion thrusters which the space agency is developing.