NASA has revealed a terrifying glimpse into our solar system's grizzly fate.
In five billion years, scientists believe the sun will collapse, leaving behind a shell of gas and dust.
When this happens, Earth will be consumed by the expanding sun or torn apart by powerful gravitational forces, before fresh planets are spat back out.
Now, in stunning new images, the James Webb Space Telescope (JWST) shows exactly what this might look like.
Located 650 light–years from Earth, the Helix Nebula is a shell of dust and gas left behind by a sun–like star that ran out of fuel thousands of years ago.
Astronomers have revealed incredible structures inside the three–light–year–wide ring of gas shed by this dying star.
According to the space agency, these images offer an 'up–close view of the possible eventual fate of our own Sun and planetary system.'
The situation is not entirely bleak, as these strange structures could contain the raw materials for new worlds capable of supporting complex life.
Throughout most of a star's life, the crushing weight of gravity is balanced by the force of nuclear fusion as hydrogen is converted into helium inside the stellar core.
Stars like our sun can remain in this stable 'main sequence' phase for billions of years as they work through massive reserves of atomic hydrogen.
But as the hydrogen starts to run out, the star can't sustain these fusion reactions and the outer layers begin to collapse inwards.
The pressure from this collapse creates such intense heat that it can fuse helium atoms into carbon, releasing a surge of energy that kickstarts nuclear fusion in the outer layers.
That reaction causes the star's outer layers to balloon outwards, becoming 100 to 1,000 times larger and cooling into an enormous Red Giant.
Eventually, the core collapses into a hot, Earth–sized star called a White Dwarf, leaving the outer layers to drift into space and form a planetary nebula like the Helix Nebula.
The intense radiation from the White Dwarf at the nebula's heart lights up the expanding shell of gas, allowing us to see the details of the stellar transformation.
In the JWST image, although the White Dwarf is out of frame, NASA reveals how the star's radiation continues to sculpt remarkable structures in its surroundings.
While previous images from the Hubble Space Telescope only rendered this region as a hazy blur, the NIRCam shows the stark transition between hot and cool gas.
In the picture, the touches of blue light mark the hottest regions, where gases are energised by the ultraviolet light from the White Dwarf.
Farther out, yellow regions show cooler areas where hydrogen atoms can form into molecules, while red indicates the coolest areas where the gas thins and dust starts to form.
Scientists believe that our own sun will begin this transformation in around five billion years, likely destroying Earth in the process.
As the sun expands, Earth will either be vaporised by the intense heat or torn to pieces and pulled in by the powerful gravitational tidal forces.
In a paper published last year, scientists found that stars which had already expanded into red giants were much less likely to host large, close–orbiting planets like Earth.
Overall, 0.28 per cent of stars surveyed were home to a giant planet, with the youngest stars in the sequence having planets more frequently.
But for stars that had already grown enough to be classed as red giants, just 0.11 per cent were home to planets.
However, Professor Janet Drew, an astronomer from University College London who was not involved in the study, says that this process is really about 'creation, rather than destruction'.
The JWST images show the cloud of hydrogen and dust that was formed in the 'envelope' of the extreme red giant before it was sloughed off to form the nebula.
Inside the nebula, Professor Drew says that this chemically enriched material is 'fed into the interstellar medium, where that material can become available for the next generation of stars and planets.'
NASA highlights cooler protective pockets inside the dust cloud, marked by dark patches amid the red and orange, where complex molecules can form.
It is that material which will eventually make its way back into the galaxy and seed the next generation of complex structures.
'So this is really about where the material comes from that is needed to form a rocky planet and sustain carbon–based life,' says Professor Drew.
So, when our planet is destroyed by the sun in five billion years' time, it might provide the raw materials needed to give rise to another generation of life.