NASA’s Spitzer Space Telescope has released a new image showing a jack-o’-lantern in space just in time for Halloween. According to the agency, a massive star much heavier than the Sun was responsible for creating the eerie cosmic object.

The object, dubbed by astronomers as the Jack-o’-lantern Nebula, is a massive cloud composed of interstellar dust and gas. Based on the new image provided by Spitzer, a nebula closely resembles a hollowed-out pumpkin with a candle inside.

According to NASA, the object’s spooky appearance was most likely caused by a nearby O-type star, which is a kind of hot star that can reach temperatures of over 30,000 kelvins. NASA noted that the star could be about 20 times more massive than the Sun.

The agency explained that a blast of radiation emitted by the star may have disrupted the nebula, creating deep pockets within the cloud. The O-type star can be seen as a white spot near the center of the nebula’s hollow region.

“A massive star — known as an O-type star and about 15 to 20 times heavier than the Sun — is likely responsible for sculpting this cosmic pumpkin,” NASA said in a statement.

“A recent study of the region suggests that the powerful outflow of radiation and particles from the star likely swept the surrounding dust and gas outward, creating deep gouges in this cloud, which is known as a nebula,” the agency added.

Since the Spitzer Space Telescope views cosmic objects using infrared light, various colors can be spotted within the Jack-o’-lantern Nebula. As explained by NASA, the most prominent colors seen in the nebula are greed and red, which were caused by the varying temperatures of the radiating dust.

“Three wavelengths of infrared light compose the multicolor image of the nebula seen here. Green and red represent light emitted primarily by dust radiating at different temperatures, though some stars radiate prominently in these wavelengths as well,” the agency stated.

“The combination of green and red in the image creates yellow hues,” NASA continued. “Blue represents a wavelength mostly emitted, in this image, by stars and some very hot regions of the nebula, while white regions indicate where the objects are bright in all three colors.

Jack-o-lantern Nebula
This carved-out cloud of gas and dust has been nicknamed the "Jack-o'-lantern Nebula" because it looks like a cosmic hollowed-out pumpkin. NASA/JPL-Caltech