NASA shared an image of a dying star that was captured by the Hubble Space Telescope. According to the agency, the Sun that’s at the center of Earth’s neighborhood will also go through the same process once its life cycle ends.

The photo taken by Hubble, which is operated by NASA and the European Space Agency (ESA), features a white dwarf star that’s near the end of its life. In the mage, this event is characterized by a large layer of gas emanating from the star. The gas within this layer is illuminated by the ultraviolet light coming from the star.

According to NASA, the Sun will eventually go through the same process once its fuel runs out. Once this happens, the massive star will collapse under the weight of its own gravity. NASA noted that this major cosmic event could happen in about five billion years from now.

“This image, taken by the NASA/ESA Hubble Space Telescope, shows the colorful ‘last hurrah’ of a star like our sun,” NASA explained in a statement. “The star is ending its life by casting off its outer layers of gas, which formed a cocoon around the star's remaining core.”

“Ultraviolet light from the dying star makes the material glow,” the agency continued. “The burned-out star, called a white dwarf, is the white dot in the center. Our sun will eventually burn out and shroud itself with stellar debris, but not for another 5 billion years.”

NASA noted that the white dwarf, which appears like a bright dot at the center of the layer of gas, is one of the hottest known stars with surface temperatures reaching over 360,000 degrees Fahrenheit.

As explained by the agency, the outer layer expelled by the star created a massive nebula filled with gas and dust. According to NASA, the nebula, which has been identified as NGC 2440, shows traces of how the white dwarf star expelled its outer layer.

“The nebula's chaotic structure suggests that the star shed its mass episodically,” NASA explained. “During each outburst, the star expelled material in a different direction. This can be seen in the two bowtie-shaped lobes.”

NGC 2440
This image, taken by the NASA/ESA Hubble Space Telescope, shows the colorful "last hurrah" of a star like our sun. NASA, ESA, and K. Noll (STScI)