For decades, scientists, physicians, science fiction writers and NASA planners have wondered if long-distance space travel — like going to Mars — would affect the physical and possibly mental condition of astronauts?

Now they have the answer: yes, it will.

The conclusion was announced Thursday after three years analyzing data from a unique experiment involving twin brothers Scott and Mark Kelly, 55, both veteran astronauts.

Beginning in March 2015, Scott spent almost a year — 340 days — aboard the International Space Station. Mark remained on Earth.

In orbit, essentially weightless, Scott “drew blood from his arms. He saved his urine. He played computer games to test his memory and reaction speed. He measured the shape of his eyes,” reports the New York Times, while 240 miles below, Mark did the same.

Comparing the brothers “provided a unique opportunity to learn what happens to the human body in space — down to the molecular level,” says the Times.

In Thursday’s report, NASA researchers said Scott’s body “experienced a vast number of changes while in orbit. DNA mutated in some of his cells. His immune system produced a host of new signals. His microbiome gained new species of bacteria.”

“Many of these biological changes seemed harmless, disappearing after he returned to Earth. But others — including genetic mutations and, after his return, declines in cognitive test scores — did not correct themselves, provoking concern among scientists,” the Times says.

While the year-long mission was being planned, Scott Kelly came up with the idea of comparing him with his brother, who had retired from the astronaut corps. He proposed it to NASA, which agreed.

“The fact that they’re twins really narrows down the alternatives,” said Susan Bailey, a cancer biologist at Colorado State University, told the Times. “We can say that, as best as we can tell, these changes are due to spaceflight.”

Many of the changes in Scott’s body were familiar to space scientists; others were mysterious, including the changes to his DNA.

Six months after Scott came back to Earth, 8.7 percent of his genes were still behaving in an altered way, and researchers found he didn’t do as well on cognitive exams as his brother.

“In his 2017 memoir, ‘Endurance,’ [Scott] Kelly describes struggling after his return with pain, sleeping troubles and other woes. One night he felt as if he was ‘fighting through quicksand,’ he wrote.”

In an interview with the Times, Kelly speculated those difficulties might be to blame for his cognitive scores. ‘It’s hard to concentrate when you’re not feeling well,’” he said.

Scott Kelly retired from NASA shortly after his year-long mission.