It’s time to place your bets. Who would win in a fight between a red giant star nearing the end of its life, and its low-mass stellar companion? A stunning new image reveals the results.

New observations by the Atacama Large Millimeter/submillimeter Array captured the outcome of this cosmic standoff, which ended in a colorful gas cloud made up of the stars' remains.

The image was described in a study published Wednesday in the journal Astronomy and Astrophysics. Aside from the beautiful aftermath of the stellar collision, the research sheds light on how stars like our own Sun may eventually die.

This new ALMA image shows the outcome of a stellar fight: a complex and stunning gas environment surrounding the binary HD101584. ESO/Digitized Sky Survey 2

As one star grew larger on its way to becoming a red giant, it almost swallowed its companion star in the process. But the underdog wasn’t going down without a fight. In response, the lower-mass companion star triggered a defense mechanism — spiraling into the other star’s core.

As it propelled itself towards its larger companion, the smaller star used up jets of gas to push itself. After hitting its target, these gas jets collided with the layers of gas that have already been shed by the ailing larger star, which formed the rings of gas highlighted in different colors.

In the image, the colors represent speed. Blue represents the gas moving the fastest towards us, while red represents the gas moving the fastest away from us. Jets propel the material in blue and red. The stars in the binary are the bright dot surrounded by the ring of green. The green ring is likely the material shot out as the lower-mass star spiraled into its more massive companion.

The surprise move caused the larger star to essentially pop like a balloon, the study reveals.

As a result, the larger star’s layers of gas were scattered all around the star system, and the core of the star was left exposed.

This wide-field view shows the region of the sky, in the constellation of Centaurus, where HD101584, a gas cloud surrounding a binary star recently studied with ALMA and APEX, is located. ESO/Digitized Sky Survey 2

The star system HD101584 is located in the constellation Centaurus. Ultimately, the star system's explosive death could help scientists predict how our own Sun will die — estimated to occur in some 5 billion years.

“Currently, we can describe the death processes common to many Sun-like stars, but we cannot explain why or exactly how they happen. HD 101584 gives us important clues to solve this puzzle since it is currently in a short transitional phase between better studied evolutionary stages," study co-author Sofia Ramstedt of Uppsala University, Sweden, said in a statement.

"With detailed images of the environment of HD 101584 we can make the connection between the giant star it was before, and the stellar remnant it will soon become."