Andromeda is the closest major galaxy to our Milky Way – and it's getting closer. In fact, astronomers believe that the two galaxies are destined to crash into each other.

But a new study suggests this fate isn't necessarily written in the stars.

Andromeda is currently barreling down on us at a speed of about 110 kilometers (68 miles) per second. That sounds pretty fast, but don't panic just yet – the galaxy is still about 2.5 million light-years from Earth, so it's expected to take a few billion years to get here.

While previous studies have been fairly confident that a collision is all but inevitable, a deeper analysis of our galactic neighborhood by researchers from the University of Helsinki and Durham University in England puts the odds closer to 50/50 of a collision occurring within the next 10 billion years.

Using the newest, most accurate motion and mass data from the Gaia and Hubble space telescopes, the team simulated the movements of not just the Milky Way and Andromeda, but two other major players in our Local Group – the Large Magellanic Cloud (LMC) and the Triangulum Galaxy.

Galaxies Sequence
An artistic rendering of the collision between the Milky Way and Andromeda, as seen from Earth, over several billion years. (NASA; ESA; Z. Levay and R. van der Marel, STScI; T. Hallas, and A. Mellinger)

When the Milky Way and Andromeda were considered in isolation, a collision within the next 10 billion years occurred in just under half of the simulations, the team says.

Adding Triangulum to the mix boosted the probability to two-thirds, while simulations with the Milky Way, Andromeda and the LMC dropped the chances to just one-third. Combining all four galaxies in one simulation resulted in a Milky Way-Andromeda merger just over 50 percent of the time.

In cases where collisions do occur, it seems we have more time than previously thought. The study found a median merger time of more than 7.6 billion years in the future, far longer than the previous estimate of 4 to 5 billion years.

"Even using the latest and most precise available observational data, the future evolution of the Local Group is uncertain," the team concluded. "Intriguingly, we find an almost equal probability for the widely publicized merger scenario (albeit with a later median time to merger) and one where the [Milky Way and Andromeda] survive unscathed."

Galaxies smashing into each other sounds like an apocalypse of epic proportions, but it's not really anything to worry about. The first point, of course, is the time frame – the Sun is only expected to live another 5 billion years or so, meaning life on Earth will experience several local, devastating Armageddons long before a galactic merger.

Even if other lifeforms find themselves in the crossfire, it's unlikely they'd really notice the cosmic pileup happening around them. Galaxies look pretty dense from a distance, but up close they're mostly empty space. There's plenty of room for stars to slot in around each other, so it's extremely unlikely that any two stars would actually collide.

Their gravitational interactions would, however, jostle each other into new orbits: For example it's thought that our Sun, probably in its red giant phase by then, would be bounced farther into the outskirts of the galaxy.

In its place, new stars would form more rapidly, as compressed hydrogen triggers an increase in star formation. Both galaxies would lose their current spiral shapes, forming one giant elliptical galaxy instead. Astronomers have already taken to nicknaming the end result "Milkomeda."

Or of course, the Milky Way and Andromeda might swing past each other and continue to evolve as individual galaxies for eons to come. The point is we just don't know for certain what their timelines look like, and while other studies were confident enough to claim a collision as a near certainty, the new work puts it down to a coin toss.

More research, including upcoming Gaia data releases, could help paint a clearer picture.

"As it stands, proclamations of the impending demise of our galaxy appear greatly exaggerated," the paper concluded.

The research has been posted as a preprint on ArXiv.