Phosphorus, an element that's key in forming DNA and fueling life on Earth, may have first arrived on the planet via comets from newborn stars.

Since the element is extremely rare in the universe, its presence on Earth has been a long-standing mystery. But scientists at the European Southern Observatory (ESO) now suggest that phosphorus may have first arrived on Earth in the molecule phosphorus monoxide - phosphorus bonded with one oxygen molecule.

Their research, published in the journal Monthly Notices of the Royal Astronomical Society on Wednesday, reveals that phosphorus monoxide forms amid the birth of new stars. They also found the molecule in a comet circling Jupiter: a frozen ball of rock and ice called 67P/Churyumov-Gerasimenko, or "67P" for short.

The discovery suggests comets could have carried phosphorus monoxide to Earth.

"Phosphorus is essential for life as we know it," Kathrin Altwegg, an author of the new study, said in a press release. "As comets most probably delivered large amounts of organic compounds to the Earth, the phosphorus monoxide found in comet 67P may strengthen the link between comets and life on Earth."

Phosphorus-carrying molecules form as stars are born

Researchers found phosphorus monoxide (represented in orange and red in the bottom-left diagram) forming in the star-forming region AFGL 5142 (upper left) and in the comet 67P.

Phosphorus is rare in the universe but essential to life (in most cases). It acts as glue that holds together the chains of nucleotides that make up DNA. Phosphorus also helps build cell walls and store cells' energy.

To figure out how the element arrived on Earth, astronomers turned to the stars.

Using the Atacama Large Millimeter/Submillimeter Array (ALMA) in Chile, the scientists behind the new study looked at a star-forming region called AFGL 5142. Studying the wavelengths of light coming from that distant region allowed them to determine which kinds of molecules interact with that light.

They found phosphorus-carrying molecules forming around the new stars.

Antennas of the Atacama Large Millimeter/Submillimeter Array (ALMA), on the Chajnantor Plateau in the Chilean Andes.

Stars are born when clouds of gas and dust collapse, giving into gravity and coalescing into new cosmic objects. When massive stars are still young, they send out flows of gas that open huge cavities in the clouds of interstellar dust around them.

Scientists think molecules with phosphorus begin to form on the walls of these cavities as they're pummeled with radiation from the young, massive stars.

But even after pinpointing a potential origin for phosphorus-carrying molecules in the universe, a big question remained: How did those molecules travel to Earth?

Comets could have carried phosphorus monoxide

The researchers turned to data from a spacecraft called Rosetta, which orbited the 67P comet from August 2014 to September 2016.

This animation, created using real data from ESA’s Rosetta mission, shows comet 67P/Churyumov–Gerasimenko.

Astronomers had already found traces of phosphorus in data Rosetta gathered about 67P, but they hadn't determined which molecule the element was part of. Then, Altwegg said, an astronomer at a conference made a suggestion: "She said that phosphorus monoxide would be a very likely candidate, so I went back to our data, and there it was."

Phosphorus monoxide can end up in comets after the walls of a newborn star's surrounding cavity collapse. The molecule can get trapped in frozen grains of dust that circle the new star, some of which eventually coalesce into comets.

Astronomers think that comets may have delivered other chemical components of life, such as amino acids and even water, to early Earth as well. Phosphorus seems to be yet another life-giving element that the space snowballs brought when they pummeled the planet.