For years, scientists have been stumped when pondering how carbon, a basic building block of life as we know it, managed to be present on the surface of our Earth.

In the early days, a volatile world seems like it may have been more inclined to boil away surface carbon or attract the element further in toward the planet’s iron-rich core. But new research published this week in Nature Geoscience indicates that the key to producing life on Earth may have come later, when foreign bodies crashed into planet with the element on board nearly 4.4 billion years ago.

“The challenge is to explain the origin of the volatile elements like carbon that remain outside the core in the mantle portion of our planet,” Rajdeep Dasgupta, a petrologist at Rice University in Texas and lead author of the study, said.

Dasgupta and his colleagues specialize in recreating the extreme conditions found inside of Earth and other rocky planets. The inner core of the planet experiences high-temperature and high-pressure. Those conditions, they argued in past papers published on the subject, would have attracted carbon inward or boiled it away when the surface was a giant sea of molten magma that eventually cooled down.

“Even before this paper, we had published several studies that showed that even if carbon did not vaporize into space when the planet was largely molten, it would end up in the metallic core of our planet, because the iron-rich alloys there have a strong affinity for carbon,” Dasgupta said.

So, the scientists muse, it is possible that volatile elements needed for life — in addition to carbon, you have sulfur, nitrogen and hydrogen for example —crashed into the planet after that outer level solidified.

But, the researchers do recognize one major problem. For that amount of volatile elements to be introduced into the planet, it would take a body similar to Mercury to crash into Earth. If that happened, the core of the colliding planet would need to push through and join Earth’s while the mantles (which are relatively soft) would need to mix. And, if there is any evidence of such a huge collision, it hasn’t been found yet.