NASA is preparing to launch a mission to deliberately smash a spacecraft into an asteroid - a test run should humanity ever need to stop a giant space rock from wiping out life on Earth.

It may sound like the stuff of science fiction, but the Double Asteroid Redirection Test is a real proof-of-concept experiment, blasting off at 6.21am Irish time, aboard a SpaceX rocket from Vandenberg Space Force Base in California.

Its target object: Dimorphos, a "moonlet" around 160 meters wide, circling a much larger asteroid called Didymos, 780 meters in diameter, which together orbit the Sun.

Impact should take place in the fall of 2022, when the pair of rocks are 11 million kilometers from Earth, the nearest point they ever get.

"What we're trying to learn is how to deflect a threat," said NASA's top scientist Thomas Zuburchen in a press call, of the $330 million project, the first of its kind.

To be clear, the asteroids in question pose no threat to our home planet.

But they belong to a class of bodies known as Near-Earth Objects - asteroids and comets that approach our planet within 50 million kilometers.

NASA's Planetary Defense Coordination Office is most interested in those larger than 140 meters in size, which have the potential to level entire cities or regions with many times the energy of average nuclear bombs.

There are 10,000 known near-Earth asteroids that size or greater, but none has a significant chance to hit in the next 100 years. One major caveat: only about 40% of those asteroids have been found to date.

24,000 kilometers per hour kick

Planetary scientists can create miniature impacts in labs and use the results to create sophisticated models about how to divert an asteroid - but models rely on imperfect assumptions, which is why they want to carry out a real world test.

The DART probe, which is a box the size of a large fridge with limousine-sized solar panels on either side, will slam into Dimorphos at just over 24,000 kilometers per hour, causing a small change in the asteroid's motion.

Scientists say the pair are an "ideal natural laboratory" for the test, because Earth-based telescopes can easily measure the brightness variation of the Didymos-Dimorphos system and judge the time it takes Dimorphos to orbit its big brother.

Their orbit never intersects our planet, providing a safe way to measure the effect of the impact, scheduled to occur between 26 September and 1 October, 2022.

Andy Rivkin, DART investigation team lead, said that the current orbital period is 11 hours and 55 minutes, and the team expects the kick will shave around 10 minutes off Dimorphos' orbit.

There is some uncertainty about how much energy will be transferred by the impact, because the moonlet's internal composition and porosity is not known.

The more debris that's generated, the more push will be imparted on Dimorphos.

"Every time we show up at an asteroid, we find stuff we don't expect," said Mr Rivkin.

The DART spacecraft also contains sophisticated instruments for navigation and imaging, including the Italian Space Agency's Light Italian CubeSat for Imaging of Asteroids (LICIACube) to watch the crash and its after-effects.

The trajectory of Didymos could also be slightly affected, but it would not significantly alter its course or unintentionally imperil Earth, scientists say.

Nuclear blasts

The so-called "kinetic impactor" method isn't the only way to divert an asteroid, but it is the technique that is the most ready with current technology.

Others that have been hypothesised include flying a spacecraft close by to impart a small gravitational force.

Another is detonating a nuclear blast close by - but not on the object itself, as in the films Armageddon and Deep Impact - which would probably create many more perilous objects.

Scientists estimate 140 meter asteroids strike once every 20,000 years.

Asteroids that are 10 kilometers wide - such as the one that struck 66 million years ago and led to the extinction of most life on Earth, including the dinosaurs - occur around every 100-200 million years.