Giant stars may be the ultimate example of “live fast, die young.” Unlike our own sun, which will shine for billions of years, more massive stars can burn through their thermonuclear fuel in only a few million years before sloughing off their outer layers and exploding in a dramatic supernova.

This week NASA unveiled a rare image from the James Webb Space Telescope (JWST) of one such stellar giant—a Wolf-Rayet star in the final, fleeting stages of its life. Named WR 124, it’s found in the constellation Sagitta and lies about 15,000 light-years away from Earth. The dying star is at least 30 times the mass of our sun but is shrinking quickly as it blasts hot gas into the cold vacuum of space.

“We’ve caught it early,” explains Anthony Moffat, a retired astrophysicist, who previously observed WR 124 using the Hubble Space Telescope and was not involved in the recent JWST measurements. Moffat has studied Wolf-Rayet stars for decades. “This is the youngest one I know of,” he says. The colorful cloud in the image—somewhat misleadingly called a planetary nebula—is only a few thousand years old. Now “the nebula is hugging the star,” he says. But as time flies by, it will bloom outward in expanding shells or rings of gas and dust.

Stars are nature’s fusion reactors, shining from the energy released by fusing hydrogen to form helium atoms. Once massive stars have burned through all their hydrogen, they begin fusing helium into heavier elements—through a more energetic fusion reaction that raises powerful stellar winds. Streaming away at speeds in excess of 150,000 kilometers per hour, these winds carry the star’s outer layers with them, ejecting enormous volumes of gas and dust into space.

This gas glows with infrared radiation, the same type of light that JWST detects. Astrophysicists created the spectacular image by combining data from two of JWST’s instruments, the Near-Infrared Camera (NIRCam) and the Mid-Infrared Instrument (MIRI). The Hubble Space Telescope, which predominantly gathers light at optical wavelengths, had captured images of WR 124 before, but JWST’s observations show the star’s burgeoning nebula in stunning new detail.

“Personally, the most exciting part of this image is that we are capturing a rare event—that is, a Wolf-Rayet star—with a level of detail that can only be achieved with JWST,” says Macarena Garcia Marin, an astrophysicist at the European Space Agency, who works with MIRI.

Only massive stars can undergo the Wolf-Rayet phase, and not all of them do. Astronomers have estimated that there are only 1,000 Wolf-Rayet stars in our galaxy—about one in every 100 million. The closest is approximately 1,000 light-years away in the Gamma Velorum star system, which is visible from the Southern Hemisphere. Wolf-Rayet stars can be a million times as luminous as the sun, Moffat says. “What they don’t have in numbers, they make up for in light,” he adds.

“That dust is spreading out into the cosmos and will eventually create planets. And this is how we got here, in fact,” said NASA astrophysicist Amber Straughn in a panel discussion at the 2023 South by Southwest Conference in Austin, Tex., where the image was first revealed. “I think this is one of the most beautiful concepts in all of astronomy.”

But while we are all made of stardust, there seems to be a lot more of it in the universe than scientists can explain from a basic cataloging of obvious sources. “It’s always an interesting place to be in science when our theories don’t match our observations—and this is where we are right now with dust,” Straughn says. These detailed pictures of a dying star’s denouement, when it forges heavy elements and generates copious dust, can help scientists refine their understanding of this foundational process.

Someday—thousands or even millions of years from now but essentially tomorrow on galactic scales—WR 124 will explode in a spectacular supernova. Besides the rich bounty of dust and heavy elements, the explosion might leave behind a black hole. But physicists don’t have a great way to predict this with certainty. Moffat guesses the supernova remnant might instead stall out as a neutron star—the last stop before a collapsing star reaches a black hole’s ultimate oblivion. Without a glimpse from some observatory that, for us, remains in the far future, we may never know which outcome occurs for WR 124. But either way, its final fate remains the same, written in the stars and planets yet to form from its generous gift of cosmic dust.