Astronomers have made the first direct discovery of a planet being ripped apart by the tremendous forces unleashed by a dying star, a possible glimpse into how the Earth will end its days.

The cosmic drama is occurring 570 light-years from Earth in the constellation Virgo. There, a sun-like star is reaching the end of its life and, in the process, annihilating its solar system. Specifically, the researchers discovered a small planet being vaporized by the star’s searing heat and ripped apart by its gravity.

“The planet is in its death throes,” said Andrew Vanderburg, Ph.D student at the Harvard-Smithsonian Center for Astrophysics and lead author of the study. “Every second, it’s losing up to 10 million kilograms,” or 22 million pounds of material.

The discoveries were made using the planet-hunting space telescope Kepler, operated by the National Aeronautics and Space Administration, as well as ground-based telescopes. Details were published Thursday in the journal Nature.

When a sun-like star runs out of the hydrogen that fuels its nuclear fusion reaction, it swells into an object that is 100-200 times its original size. This “red giant” eventually collapses into a much smaller body known as a white dwarf—an object that possesses intense gravity.