The results of the save-the-world test were announced by Nasa on Tuesday.

Two weeks ago, the space agency attempted the first test of its kind to see if a rock could be moved out of the way.

A comet-like trail of dust and rubble stretching thousands of miles was created by the debris flung out into space by the Dart spacecraft. It took days of telescope observations to figure out how the impact changed the path of the asteroid.

The moonlet took a long time to circle its parent asteroid. Bill Nelson said the impact changed the asteroid's path by about 32 minutes.

Nelson said that the mission shows that Nasa is prepared for anything.

As the asteroids travel around the sun, they don't pose a threat to Earth. Scientists chose the pair for the first attempt to change the position of a body in the sky.

The vending machine-size Dart was destroyed when it slammed into the asteroid 7 million miles away. The test was expensive.