Astronomers have discovered when the world will end. But luckily the earth's collision with another solar system won't be for another four billion years, as Science Editor Tom Clarke explains.

Please wait while this video loads. If it doesn't load after a few seconds you may need to have Adobe Flash installed.

Following a painstaking seven years of star gazing astronomers using NASA's hubble telescope have confirmed that our Milky Way is on a spectacular collision course with our nearest galactic neighbour Andromeda.

The speed of the crash will be spectacular - our galaxy and Andromeda will smash together at more than one million miles per hour - but so are the timescales: we're not destined to meet for another four billion years, and it will take another two billion for both galaxies to coalesce into a new single entity.

Head-on collision?

Science fiction has seen this coming for a while. In the 1951 sci-fi classic, When Worlds Collide, life on earth is destroyed when the star Bellus has a head-on smash with Earth. At the time it was known that Andromeda and our Milky Way have been moving towards each other for a long time. What wasn't clear was whether they would pass each other in the vastness of the Universe, or collide head-on.

But the astronomers behind this discovery say there is probably no need for future earthlings to panic. "The distances between stars and galaxies are vast so when the two galaxies collide, the individual stars will not actually run into each other," explains Dr Roeland van der Marel of the space telescope science institute in Baltimore, Maryland.

"No individual star in Andromeda will directly hit our sun. And, in fact, it is unlikely that any star would even come close enough to significantly perturb the earth's place in the solar system," he added.

Read more: 'Star Wars' planet discovered by astronomers

Most detailed measurements recorded

The Hubble team used new cameras fitted to the telescope in 2009 to get the most detailed ever measurements of stars within the Andromeda galaxy. Computer simulations of that data allowed them to conclude out two galaxies will eventually meet.

As it approaches, the sky at night will never be the same again.

The distances between stars and galaxies are vast so when the two galaxies collide, the individual stars will not actually run into each other. Dr Roeland van der Marel

"We'll see it as Andromeda moves toward us it will get bigger on the sky and gets close enough to distort the Milky Way. As the galaxies pass each other, bright new regions of star formation will light up the sky as gas gets compressed and forms new stars," said Dr van der Marel.

"Over time the gas and dust will be lost from the system, the star formation ceases and all that's left will be a bright elliptical galaxy filling much of our night sky having replaced today's familiar view of the Milky Way."

Though our planet may not be in direct peril, if the position of our sun in relation to the earth was even slightly altered, it could be very bad news for life on earth - if life still exists four billion years from now.

In When World's Collide, the protagonist and his new love (an astronomer's daughter) escape to the passing planet Zyra in a space rocket to continue the human race. Perhaps our descendents will pull a similar stunt as Andromeda moves into view ensuring the future of mankind - or whatever type of life form they turn out to be.