But, there is no need to panic, as the head-on collision is expected to happen after four billion years, astronomers at the Space Telescope Science Institute said today.
Although Earth and its solar system won't be destroyed, it will be pushed away from the galactic core more than it is now, the scientists said. But, it is likely that the cosmic event will throw away the Sun to another area of the galaxy and stars will be tossed into different orbits, they added.
"After nearly a century of speculation about the future destiny of Andromeda and our Milky Way, we at last have a clear picture of how events will unfold over the coming billions of years," Sangmo Tony Sohn of the institute based in Baltimore in the US was quoted as saying by the Daily Mail.
After the Andromeda galaxy finally strikes the Milky Way, it will be another two billion years before the two totally come together and form a single elliptical galaxy, Sohn said.
According to the scientists, a mutual pull of gravity is bringing the two galaxies together as the Andromeda, known as M31, falls at a ferocious rate toward the Milky Way.
The Andromeda is currently 2.5 million light-years away, but it is plowing toward Earth's galaxy at roughly 250,000 miles per hour -- at a rate which is equivalent of travelling from Earth to the moon in an hour, the scientists said.
In the 'worst-case scenario' simulation, M31 slams into the Milky Way head-on and the stars are all scattered into orbits," said team member Gurtina Besla.
Astronomers also believe a third, smaller galaxy called the Triangulum will also be a part of the collision and could join the Milky Way and Andromeda mashup.
It previously had been difficult to determine whether the two galaxies would slam into each other. But the NASA Hubble Telescope team were able to make certain that the two will crash with exact views of Andromeda's sideways motion.