Scientists have long puzzled over just how Mars went from a warm and wet environment to the cold and arid planet depicted in the movie “The Martian.”

Now, they appear to have the answer.

Data from NASA’s Mars Atmosphere and Volatile Evolution (MAVEN) mission released Thursday show that solar winds over time appear to have stripped away the atmosphere that kept the Red Planet balmy - and that things were at their worse during solar storms.

"Solar-wind erosion is an important mechanism for atmospheric loss, and was important enough to account for significant change in the Martian climate,” said Joe Grebowsky, MAVEN project scientist from NASA’s Goddard Space Flight Center in Greenbelt, Maryland and a co-author on one of several papers of the journal Science and a special issue of Geophysical Research Letters, a journal of the American Geophysical Union.

Related: Mars has flowing liquid water, NASA confirms

“MAVEN also is studying other loss processes -- such as loss due to impact of ions or escape of hydrogen atoms -- and these will only increase the importance of atmospheric escape,” he added in a statement.

John Grunsfeld, astronaut and associate administrator for the NASA Science Mission Directorate in Washington, said the search for a mechanism to the change has been a goal of scientists ever since they found that Mars appears to have had a “thick atmosphere warm enough to support liquid water which is a key ingredient and medium for life as we currently know it."

“Understanding what happened to the Mars atmosphere will inform our knowledge of the dynamics and evolution of any planetary atmosphere,” he said. “Learning what can cause changes to a planet’s environment from one that could host microbes at the surface to one that doesn’t is important to know, and is a key question that is being addressed in NASA’s journey to Mars.”

Based on the MAVEN measurements, solar wind strips away gas at a rate of about a quarter pound every second.

"Like the theft of a few coins from a cash register every day, the loss becomes significant over time," Bruce Jakosky, MAVEN principal investigator at the University of Colorado, Boulder and another co-author on one of the papers, said in a statement. "We've seen that the atmospheric erosion increases significantly during solar storms, so we think the loss rate was much higher billions of years ago when the sun was young and more active.”

Launched in 2013, the goal of NASA's MAVEN mission is to determine how much of the planet's atmosphere and water have been lost to space.

The theory on the role of the solar winds was bolstered earlier this year when a series of dramatic solar storms hit Mars’ atmosphere and MAVEN found that the loss was accelerated. The combination of greater loss rates and increased solar storms in the past suggests that loss of atmosphere to space was likely a major process in changing the Martian climate.

Related: Do Mars rover photos show potential signs of ancient life?

The solar wind is a stream of particles, mainly protons and electrons, flowing from the sun's atmosphere at a speed of about one million miles per hour. The magnetic field carried by the solar wind as it flows past Mars can generate an electric field, much as a turbine on Earth can be used to generate electricity. This electric field accelerates electrically charged gas atoms, called ions, in Mars’ upper atmosphere and shoots them into space.

The latest results indicate that the loss is experienced in three different regions of the Red Planet: down the "tail," where the solar wind flows behind Mars, above the Martian poles in a "polar plume," and from an extended cloud of gas surrounding Mars. The science team determined that almost 75 percent of the escaping ions come from the tail region, and nearly 25 percent are from the plume region, with just a minor contribution from the extended cloud.

Water, or lack thereof, has long fascinated scientists studying Mars.

This year, there have been several studies offering further proof that ancient regions of Mars bear signs of abundant water, including valleys carved by rivers and mineral deposits that only form in the presence of water.

Among them was a study that found the planet would have probably had an Arctic Ocean’s worth of water covering almost half of its northern hemisphere. There would have been enough water to cover the entire surface of the planet in a liquid layer about 450 feet deep.

Another study found that there were probably streams and lakes on Mars between 3.8 billion and 3.3 billion years ago.

Related: NASA confirms ancient lakes existed on Mars 2 to 3 billion years ago

Recently, researchers using NASA's Mars Reconnaissance Orbiter observed the seasonal appearance of hydrated salts indicating briny liquid water on Mars. However, the current Martian atmosphere is far too cold and thin to support long-lived or extensive amounts of liquid water on the planet's surface.

In other MAVEN results reported in Science, data indicate a steady mixing of carbon dioxide, argon, and nitrogen dioxide, as well as higher amounts of oxygen than previously estimated. The density of these elements about 124 miles from Mars' surface varied substantially as MAVEN completed each orbit, which the authors suggest may be caused by gravity wave interactions with wind and small-scale mixing processes occurring below.

Another study found an aurora in the northern hemisphere, which dips lower into the atmosphere than any other confirmed aurora to date, at 37 miles. MAVEN’s Imaging Ultraviolet Spectrograph, which depicts ultraviolet light, detected this aurora during a solar energetic particle outburst. But where this type of aurora on Earth is driven by magnetism of the poles, the authors suspect that Mars’ aurora may be driven by the remnant magnetic field of the crust, creating a more even and diffuse aurora.