This twisted shape is the result of a head-on collision about 25 million years ago (Photo: International Gemini Observatory/NOIRLab/NSF/AURA)

Scientists have managed to capture the head-on collision of two galaxies 180 million light-years from Earth.

The spectacular scene looks like a butterfly flapping its wings or a giant candy.

The colliding galaxies UGC 12914 and UGC 12915 have been nicknamed “toffee galaxies” because the shape of the collision resembles the famous candy brand.

This twisted shape, captured by the Gemini North telescope in Hawaii, is the result of a head-on collision that happened about 25 million years before this image was taken.

A thin bridge can be seen between the two galaxies, consisting of narrow molecular filaments (shown in brown) and clumps of hydrogen gas (shown in red). The complex band structure resembles toffee being stretched as the couple slowly separates.

Please enable JavaScript to view this video and consider upgrading to a web browser that supports HTML5 videos

The Gemini North telescope, along with its Chile-based counterpart Gemini South, is one of the world’s most advanced optical and infrared light-detecting telescopes.

Galactic collisions are transformative events largely responsible for the evolution of the universe. The mixing and mixing of stellar material is an incredibly dynamic process that can lead to the formation of molecular clouds populated with newly formed stars.

However, this particular collision 25-30 million years ago seems to have resulted in a different type of structure.

A bridge of highly turbulent gas with no significant star formation spans the gap between these two galaxies.

Collisions in the Milky Way can happen for a variety of reasons, often involving a larger galaxy and a smaller satellite galaxy.

As they drift toward each other, the satellite galaxy may pull one of the larger galaxy’s primary spiral arms out of orbit. Or the satellite galaxy may intersect the larger galaxy and significantly disrupt its own structure.

The Gemini North telescope, along with its Chile-based counterpart Gemini South, is one of the most advanced optical and infrared light-detecting telescopes in the world (Photo: Rolf Schulten via Getty Images)

In other cases, a collision can result in a merger if neither member has enough momentum to continue after the collision.

“In all of these scenarios, material from both galaxies mixes through a gradual combination and redistribution of gas, as if two pools of liquid are slowly flowing into each other. The resulting collection and compression of the gas can then trigger star formation,” the observatory said in a statement.

However, a head-on collision would be more like pouring liquid from two separate cups into a common bowl.

When the Taffy galaxies collided, their galactic disks and gaseous components collided directly. This resulted in a huge energy injection into the gas, making it very turbulent.

As the two emerged from their collision, gas was drawn from each galaxy at high speed, creating a massive gas bridge between them. The turbulence of stellar material throughout the bridge now prevents the collection and compression of gas needed to form new stars.