The Medusa Nebula's most detailed close-up ever shows a dying star's fate, similar to what will befall our sun in a few million years.

The colorful display of gas some 1,500 light-years from Earth is happening because a star in the center of the nebula is shedding its outer layers into space. The new images and a stunning video of the Medusa Nebula were created by astronomers with European Southern Observatory. Called a "planetary nebula", this is a common fate for stars that are about the size of our sun.

The gas will persist for a few tens of thousands of years until it moves away, leaving behind a cold remnant of the star, called a white dwarf. Astronomers captured the image using ESO's Very Large Telescope in Chile. [Video: How the Sun Will Die]

The Medusa Nebula captured in a new close-up image from the European Southern Observatory's Very Large Telescope in Chile. The nebula is formed from a dying star shedding its outer layers.
The Medusa Nebula captured in a new close-up image from the European Southern Observatory's Very Large Telescope in Chile. The nebula is formed from a dying star shedding its outer layers.
Credit: European Southern Observatory

"Medusa was a hideous creature with snakes in place of hair. These snakes are represented by the serpentine filaments of glowing gas in this nebula," wrote the European Southern Observatory of the image.

"The red glow from hydrogen and the fainter green emission from oxygen gas extends well beyond this frame, forming a crescent shape in the sky," ESO officials wrote in a description. "The ejection of mass from stars at this stage of their evolution is often intermittent, which can result in fascinating structures within planetary nebulae."

Planetary nebulas are characterized by a particular form of glowing gas called doubly ionized oxygen. The gas is excited by ultraviolet radiation emanating from the star, which strips away electrons from the gas.

A wide-view of the Medusa Nebula, a large nebula 1,500 light-years from Earth formed by a dying star that is shedding its outer layers. This image was created from astronomy images from the Digitized Sky Survey 2.
A wide-view of the Medusa Nebula, a large nebula 1,500 light-years from Earth formed by a dying star that is shedding its outer layers. This image was created from astronomy images from the Digitized Sky Survey 2.
Credit: European Southern Observatory/Digitized Sky Survey 2

The Medusa Nebula is also called Abell 21 after the American astronomer George O. Abell, who found it in 1955. At first, astronomers thought that perhaps it could be leftovers of a supernova explosion, but measurements of the gas in the 1970s showed that it actually comes from a dying star.

The nebula, which is in the constellation Gemini, is about 4 light-years across.

Follow Elizabeth Howell @howellspace. Follow us @Spacedotcom, Facebook and Google+. Original article on Space.com.