It’s inevitable; in about 5 billion years our sun will burn up all of the hydrogen in its core, then it will swell into a red giant, eating Mercury and Venus before collapsing. But researchers haven’t been sure exactly what that collapse will look like. Most believed the sun would quietly collapse into a relatively cool white dwarf, a very dim reminder that our solar system once existed. But a new model suggests the sun will go out with some style, creating a planetary nebula visible from millions of light-years away, reports Ian Sample at The Guardian.

“These planetary nebulae are the prettiest objects in the sky and even though the sun will only become a faint one, it will be visible from neighboring galaxies,” Albert Zijlstra of the University of Manchester and co-author of the study in the journal Nature Astronomy told The Guardian. “If you lived in the Andromeda galaxy 2 million light years away you’d still be able to see it.”

According to a press release, stars collapsing into planetary nebulae aren’t uncommon. Approximately 90 percent of stars in the universe meet their fate through this process. As a star meets its end, it ejects up to half its mass into space creating an envelope of gas and debris and exposing the star’s core. The core then sends out x-rays and ultraviolet light that will cause that envelope of debris to shine for about 10,000 years, producing a nebula while the star’s core flickers off.

Sample reports that in previous models, after our sun blew off its envelope of gas and dust, it would take much too long for the core to heat up enough to turn the dust into a glowing nebula before it dissipated. That model suggested that it would take a star twice the mass of the sun to produce a nebula bright enough to see.

The new model for stellar death introduced in the paper, however, updates the process. Once the core ejects the envelope of gas and debris, it heats up three times faster than previously believed. That means enough energy is released that even a low-mass star like good old Sol has enough juice to light up its debris field to produce a nice, bright planetary nebula when it dies. “What we’ve shown is that the core will be hot enough in five to 10 thousand years after the outer layers have been ejected, and that is quick enough,” Zijlstra tells Sample. “The sun is right on the lower limit of being able to form a planetary nebula.”

Even stars that are just a few percent less massive than the sun will not produce a planetary nebula.

Unless humans get off the planet and head elsewhere, however, we won’t have a chance to see the nebula our sun leaves behind. Sample reports that in about 2 billion years, as the sun ages and begins to swell into a red giant, the heat could boil the oceans and make life as we know it impossible. Until then, however, the Hubble Space Telescope, Chandra X-Ray Observatory and other scopes have captured plenty of beautiful nebulae that we can gaze upon.