Often when stars die, they go out with a bang in the form of a supernova, leaving a small, dim stellar corpse in the center of a gaseous nebula. But sometimes, these leftover stars can get a new spark of life.Astronomers used a telescope in the Canary Islands to watch a dying star, dubbed HuBi 1, get a brief second wind. And as they observed, they noticed a strange side effect: a shockwave sent from the fading star struck the surrounding gas in a way that made it appear “inside out.”The discovery, published this week in Nature Astronomy , marks the first time astronomers have seen such behavior from a sun-sized star. And it hints at how our own star may perish.When a star like our sun dies, it typically leaves behind a stable core of carbon and oxygen at the heart of a beautiful and gaseous nebula. But if there’s a thin layer of helium on top of that core, it can ignite.That’s what astronomers think happened here.“There are estimates that 10 to 15 percent of planetary nebulae undergo these events,” says Martin Guerrero of Instituto de Astrofísica de Andalucía in Spain, a lead researcher on the discovery team. “But the timescale it takes [for] material ejected at high speeds to disperse is short, maybe shorter than 200 years. Thus, the chance to witness their effects on the nebula are small.”As the shockwave pushed away from HuBi 1, the surrounding nebulous gas was altered.Normally, ultraviolet radiation from these stellar corpses strip nearby gas of its electrons (a process called ionization). But gas that’s farther away is largely spared from this electron strip down, remaining neutral.However, if a shockwave ripples through the nebula, it dramatically heats and ionizes the gas. However, as the shockwave continues outward, the material in the post-shock regions quickly cools and recombines. This is what gave HuBi 1 its “inside out” appearance.The observations provide us with a possible preview into our own sun’s final outcome. Guerrero estimates there’s a one in 10 chance that our own life-supporting star may experience its final breath of life as HuBi 1 did. Of course, by then the sun would have already swelled into a red giant, so our planets would likely have been wiped out. Hopefully humans would have boarded their spaceships and set up camp in a new solar system.This article originally appeared on Discovermagazine.com Editor's note: An earlier version of this article erroneously indicated that our sun would go supernova at the end of its life.