This image of the galaxy ESO 137-001 is a combination of images from the Hubble Space Telescope and Chandra X-ray Observatory showing the galaxy being ripped to shreds (blue streaks) as it passes through a galaxy cluster.

A mysterious galactic "jellyfish" has been spotted swimming in deep space and dragging its sparkly tentacles through the cosmos.

Astronomers aren't sure how this galaxy ended up with its long, gassy appendages, but NASA's upcoming James Webb Space Telescope is going to investigate this cosmic cephalopod after it launches into orbit in 2021.

The "jellyfish" galaxy, named ESO 137-001, is a barred spiral galaxy much like the Milky Way. It is located about 220 million light-years from Earth in the southern constellation Triangulum Australe and is part of a cluster of galaxies known as Abell 3627. Its long tail of hot gas stretches across 260,000 light-years of space, and it's filled with newborn stars.

Related: 'Space Jellyfish' and Cosmic Blobs Seen by Hubble Telescope

"The newly forming stars in the tail are mysterious because processes common in large groups of galaxies should make it difficult for new stars to emerge," NASA officials said in a statement . That's because the space between galaxies in a cluster like Abell 3627 is filled with diffuse clouds of hot gas that can be detrimental to galaxies that pass through it.

That intergalactic gas will strip away a galaxy's own supply of dust and gas through a process known as "ram pressure stripping ." And when galaxies start to run out of dust and gas, they run out of the stuff they need to make new stars and turn into what astronomers call galactic burnouts .

"Both gas and dust are getting stripped off, but how much and what happens to the stripped material and the galaxy itself are still open questions," Stacey Alberts, a researcher at the University of Arizona and a co-investigator for the James Webb Space Telescope science team, said in the statement.

Scientists were surprised to find that the "jellyfish" galaxy ESO 137-001 has been sprouting new stars in its gassy tentacles. "We think it's hard to strip off a molecular cloud that's already forming stars because it should be tightly bound to the galaxy by gravity. Which means either we're wrong, or this gas got stripped off and heated up, but then had to cool again so that it could condense and form stars," Alberts said. "Telling these two scenarios apart is one of the things we want to get at."

NASA's first images of this "jellyfish" came from the Hubble Space Telescope and the Chandra X-ray Observatory in 2014. When the James Webb Space Telescope — which NASA has billed as Hubble's successor — revisits the galaxy, it will get a view that's closer and clearer than ever before.

Webb will not only be able to photograph the galaxy with 50 times more spatial resolution, but it will also be able to observe more wavelengths of light using its Mid-Infrared Instrument (MIRI). Consisting of both a camera and spectrograph, MIRI can see light emitted by elements like hydrogen, oxygen, carbon and sulfur. By comparing new data from Webb with data from Hubble and Chandra, scientists hope to get a clearer picture of what is going on in the galaxy's tail.

"Each different wavelength gives you a piece of the puzzle," Alberts said. By putting together those parts of the puzzle, scientists hope to figure out exactly how this "jellyfish" got its star-speckled tentacles — and maybe even determine the galaxy's fate.