For the first time, NASA astronomers say they have observed a dead star ripping up a planetary system and consuming materials from other planets, which they say offers insights into the beginning and end of life here on Earth.

Data collected from NASA’s Hubble Space Telescope and other observational projects were used to analyze a white dwarf star – which is the dying, dense remains of a star like Earth’s sun – called G238-44.

When stars collapse, the density of the remains often pulls other objects in space towards them. In the case of G238-44, the white star was observed to be violently disrupting the inner and outer reaches of a nearby planetary system. The breakup of the planetary system around G238-44 also provides researchers the chance to see the ingredients of a planet – what materials they are made up of, and in what quantities, to better understand what elements, metals, and other materials make up a planet.

This case study in “cosmic cannibalism,†on Wednesday, is crucial to the understanding of our universe and its newly forming systems, scientists say.

NASA scientists also noted that the white star appeared to siphon off both rocky and icy debris from nearby bodies. The researchers say the siphoning of icy debris is particularly interesting because of what it suggests about how water is found on various moons or planets in the universe. Scientists suggest icy debris crashing into dry, rocky planets “irrigates†them, which could be how water was delivered to Earth billions of years ago.

"We have never seen both of these kinds of objects accreting onto a white dwarf at the same time," Ted Johnson, the lead researcher said in a press release. "By studying these white dwarfs, we hope to gain a better understanding of planetary systems that are still intact."

Observations of this white dwarf also gave researchers the opportunity to study how our own planetary system may collapse at the end of our sun’s life.

When a star first begins to die, it expands, altering the orbits of any nearby planets and violently thrusting smaller objects such as asteroids or moons into dramatic and eccentric orbits. But as the star collapses, it grows dense, which could pull some of the objects in an irregular orbit too close to the white dwarf. The force of the white dwarf tears these objects apart and turns them into gas or dust that forms a ring around the dying star before falling onto its surface.

By observing how this process occurred with G238-44, scientists can begin to understand how the process may replicate when Earth’s sun begins to die.

Research suggests that when our sun begins to expand at the end of its life, it will likely engulf and vaporize the first three planets in our solar system, including Earth, before its violent throes begin to disrupt the orbits of the remaining planets, similarly to the planetary system that surrounds G238-44.

But fear not – scientists say the end of the sun’s life is not likely to happen for another 5 billion years, so there’s plenty of time to figure it out.