NASA's James Webb Space telescope picked up an unusual photo in the night sky.

From just over 5,000 light-years from Earth, researchers saw at least 17 dust rings around a pair of stars. The duo is known as Wolf-Rayet 140, which is an "O-type star" born with at least 25 times more mass than Earth's Sun.

A Wolf-Rayet star, according to a NASA press release citing the discovery, is near the end of its life, when researchers expect it will collapse and form a black hole.

The images captured by the telescope are extraordinary because of the specific conditions needed for dust to form in outer space.

"Transforming gas into dust is somewhat like turning flour into bread," a NASA press release explains.

Wolf-Rayet stars shed mass, peeling back layers until complex elements are exposed. Some of those include carbon, which scientists call a "heavy" element and when mixed with cool space winds and compression from when two stars meet, NASA says, it is like "two hands kneading dough."

This creates dust which forms as the stars continue to turn. The stars' orbits bring them together once every eight years, the rings captured in the photo are like rings on a tree trunk marking the passage of time.

This is extremely important data because NASA can now use this as evidence that Wolf-Rayet stars produce "carbon-rich dust molecules."

When the Webb telescope picked up about 17 dust rings it showed researchers that the area around the stars was clear of other material, indicating why the dust was so visible.

"The preservation of the dust shells indicates that this dust can survive in the hostile environment between stars, going on to supply material for future stars and planets," the press release reads.

Astronomers are amazed to catch such a sight through photos because only 600 Wolf-Rayet stars have been discovered to date, with estimates of at least a few thousand in our galaxy.

"Even though Wolf-Rayet stars are rare in our galaxy because they are short-lived as far as stars go, it's possible they've been producing lots of dust throughout the history of the galaxy before they explode and/or form black holes," said Patrick Morris, an astrophysicist at Caltech in Pasadena, California, and a co-author of the new study.

He added: "I think with NASA's new space telescope we're going to learn a lot more about how these stars shape the material between stars and trigger new star formation in galaxies."