When the Sun reaches the end of its life, it will grow to 100 times its current size, swallowing the Earth as well.

Many planets in other solar systems face a similar fate as their host stars age. However, astronomers at the University of Hawaii’s Institute for Astronomy say there might be hope: they’ve discovered a planet that survived such an event.

The 8 UMi b planet, officially named Halla, is similar to Jupiter and orbits the red giant star Baekdu (8 UMi), just half the distance from Earth to the Sun.

The team of astronomers discovered that Halla continues to exist, despite Baekdu’s dangerous evolution. They found that the star is burning sun at its core, indicating that it had already greatly expanded as a red giant star sometime in the past.

The star would have swelled up to 1.5 times the planet’s orbital distance, swallowing the planet in the process, before shrinking to its current size, just a tenth of that distance. However, the planet continues to exist, being an “excellent survivor,” according to the study’s lead author, Mark Hohn.

The question is how the planet managed to survive, and the dominant theories are three: that it started from a larger orbit before reaching close to its star, like “warm” or “hot” planets like Jupiter, or that it never faced any danger of destruction, as the host star Baekdu may have originally been two stars, whose merger prevented each of them from expanding enough to engulf a planet. The third possibility is that Halla is relatively young and formed from the gas cloud produced by the violent collision between the two stars.

The study is published in the journal Nature.