That's why scientists and government groups are working ways to destroy or redirect asteroids, comets and other near-Earth objects (often called NEOs), should one ever head our way.

One of the best ways to protect our planet may be a laser system called Directed Energy System for Targeting of Asteroids and Exploration, or DE-STAR. It's capable of vaporizing NEOs and knocking them off course.

The team behind DE-STAR wants to put a giant array of lasers into Earth's orbit and fire them anytime an asteroid or comet comes close to Earth. They also propose a system of smaller arrays, called DE-STARLITE, that could fly out and meet an incoming asteroid or comet.

The laser would heat one side of the NEO to the point of vaporization, which would cause chunks of it to disintegrate, and the reactionary force would be enough to push the asteroid onto a new orbital path, according to research published on the preprint server arXiv.

They've tested the lasers on small simulated asteroids. The lasers are powerful enough to stop a spinning asteroid in its tracks:

The technology for this is already available. The challenge lies in building an array large enough to deflect a fully sized asteroid.

"The bigger the NEO, the longer the time needed," Qicheng Zhang, a University of California, Santa Barbara, student working on the idea, told the blog Astro Watch. "The bigger the laser, the shorter the time needed. With a very small 20 kilowatt DE-STARLITE, a 300-meter-wide (1,000 feet) asteroid can be deflected in 15 years. Smaller asteroids can be deflected in under a year, after the spacecraft's arrival at the asteroid."

In other words, the smaller array would be useful for targets that we know about well in advance. But we'd need a larger array (at least hundreds of feet wide) to save us from the NEOs that sneak up on us.