Phobos is the larger of Mars' two small moons and bears the scars of millennia of small impacts.

Scientists have struggled for decades to explain how the two tiny moons of Mars came to be, but a new study relying on old data bolsters one of the two major hypotheses.

That idea argues that Phobos and Deimos formed in the aftermath of a giant impact with Mars itself, which makes an awful lot of sense given their orbital paths. But that explanation hasn't been a perfect fit: Both these tiny moons appear incredibly dark, like a certain class of carbon-rich asteroids, suggesting that they were born in the asteroid belt, flew too close to Mars and got trapped by the planet's gravity. Phobos is about 14 miles (22 kilometers) across, while Deimos is 8 miles (13 km) wide.

"The fun part for me has been taking a poke at some of the ideas out there using an old data set that's has been underutilized," lead author Tim Glotch, a geoscientist at Stony Brook University in New York, said in a statement released by the American Geophysical Union, which runs the journal that published the new research. [Moons of Mars: Amazing Photos of Phobos and Deimos]

That old data set was gathered in 1998 by NASA's Mars Global Surveyor, which measured the heat signature of Phobos, the larger of the two Martian moons. Glotch and his colleagues compared that data with data from a range of terrestrial rocks and a tiny piece of a meteorite gathered near Tagish Lake in western Canada. Scientists think this meteorite broke off from an asteroid of the same type suspected to have formed the moons.

But it turned out that the old Phobos data didn't match that Tagish meteorite very well. "In fact, what matches Phobos most closely, or at least one of the features in the spectrum, is ground-up basalt, which is a common volcanic rock, and it's what most of the Martian crust is made out of," Glotch said in the statement.

"That leads us to believe that perhaps Phobos might be a remnant of an impact that occurred early on in Martian history," he said. That old Martian material would be mixed with other material from the impact.

If the research team is proven correct, the insight would resolve the perceived flaw in the giant-impact theory of Martian moon formation. And conveniently enough, scientists may not have to go fishing through more decades-old data to answer this question.

That's thanks to a planned Japanese mission called Martian Moons Exploration. The spacecraft, which the Japanese space agency hopes to launch in the early 2020s, is being designed to orbit both moons and bring home a sample from one of them. Scientists could then study that sample, as well as asteroid samples brought back by the Japanese mission Hayabusa2 and the U.S. mission OSIRIS-REx, to compare the composition of the three different solar system bodies — and, with some luck, solve the Martian moon mystery once and for all.

The new research is described in a paper published Sept. 24 in the Journal of Geophysical Research: Planets.

Email Meghan Bartels at mbartels@space.com or follow her @meghanbartels. Follow us @Spacedotcom, Facebook and Google+. Original article on Space.com.