Our galaxy is on a collision course with its nearest neighbour, Andromeda, and the head-on crash is expected in four billion years, the US space agency Nasa said.

Astronomers have long theorised that a clash of these galaxy titans was on the way, though it was unknown how severe it might be, or when, with guesses ranging from three to six billion years.

But years of “extraordinarily precise observations” from Nasa’s Hubble Space telescope tracking the motion of the Andromeda galaxy “remove any doubt that it is destined to collide and merge with the Milky Way,” Nasa said in a statement.

“It will take four billion years before the strike.”

After the initial impact it will take another two billion years for them “to completely merge under the tug of gravity and reshape into a single elliptical galaxy similar to the kind commonly seen in the local universe,” Nasa added.

The stars inside each galaxy are so far apart that they are not likely to collide with each other, but stars will likely be “thrown into different orbits around the new galactic centre”.

Scientists have long known that Andromeda, also known as M31, is moving towards the Milky Way at a speed of 402,000 kilo­metres per hour or fast enough to travel from the earth to the moon in one hour.

But the nature of the crash depended on the galaxy’s sideways motion in the sky and that trajectory remained a mystery for more than 100 years until the latest analysis of Hubble’s findings were revealed.

“This was accomplished by repeatedly observing select regions of the galaxy over a five- to seven-year period,” said Jay Anderson of Space Telescope Science Institute in Baltimore.

Andromeda was first spotted as a little cloud by the Persian astronomer Abd-al-Rahman Al Sufi in 964 AD.

“In the worst-case-scenario simulation, M31 slams into the Milky Way head-on and the stars are all scattered into different orbits,” said Gurtina Besla of Columbia University in New York. “The stellar populations of both galaxies are jostled and the Milky Way loses its flattened pancake shape with most of the stars on nearly circular orbits.”

“The galaxies’ cores merge and the stars settle into randomised orbits to create an elliptical-shaped galaxy.”

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.