Hollywood may have been right after all. If an asteroid is on a collision course with Earth, there's one way to save us all: Nuke it.

Most planetary scientists have suggested that nuclear weapons wouldn't work, or they would leave several good-sized chunks to hit us.

But David Dearborn of Lawrence Livermore National Laboratory disagrees. The astronomer and nuclear weapons expert says that with enough lead time, nukes could be life savers.

Dearborn has calculated the effects of nuclear weapons on asteroids of various sizes and at various distances from Earth. The calculations show that an asteroid several years away from impact would need a nudge of just one centimeter per second to miss us. Nuclear weapons exploded at the right distance from the asteroid could provide that nudge by vaporizing material from the surface, creating a "jet" of hot gas that would alter the asteroid's path.

Nukes might even save us from asteroids at close range. Dearborn simulated the effects of a nuclear explosion on the surface of an object the size of Apophis, a 900-foot-wide asteroid that'll pass quite close to Earth in 2029 and 2036. If the explosion took place just 15 days before impact, it should blast the asteroid to bits. And as the debris spreads out along the asteroid's orbit, only a tiny fraction of it would hit Earth.

And the operation could all be done remotely. Unlike Hollywood scenarios, no Bruce Willis is required.