A giant space rock wiped out the dinosaurs 65 million years ago. Could Earth be hit again? Here's everything you need to know:

What's out there?
So far, NASA has classified more than 21,000 asteroids and more than 100 comets as near-Earth objects. Of that group, about 2,000 are considered "potentially hazardous," meaning they have orbits within 4.5 million miles of Earth's and are big enough to cause massive devastation on impact. Congress has directed NASA to find and track at least 90 percent of the objects measuring 459 feet in diameter or larger and that pass within 30 million miles of Earth's orbit. So far, nothing has been discovered that poses a threat within the next 100 years. But scientists have identified only an estimated 40 percent of near-Earth objects. Researchers were stunned in July when a previously undetected "city killer" asteroid that was up to 427 feet wide came within 45,000 miles of Earth — less than one-fifth the distance to the moon. If the asteroid had struck the Earth, "it would have gone off like a very large nuclear weapon," said Michael Brown, an observational astronomer at Australia's Monash University.

Why did scientists miss it?
Asteroids are tough to spot in the void of space. Astronomers continually take pictures of the sky, using computers to look for movement across the background of stars. Smaller asteroids shine less brightly and need to come relatively close to Earth at some point in their orbits to be detected by ground-based telescopes. The city killer that zipped by this summer had an "eccentric orbit" that made it detectable for only brief periods of time. It also came close to the nearly full moon, the brightness of which made it tougher to spot. But don't panic: Your odds of being killed by an asteroid are exceedingly slim at roughly 1 in 250,000. You're far more likely to die in an airplane crash (1 in 30,000) or an earthquake (1 in 130,000).

How often is Earth hit?
The planet is under constant bombardment. About 100 tons of dust and gravel-size particles enter the planet's atmosphere every day, burning up from friction as they crash through air molecules at more than 45,000 mph. These tiny collisions generate so much heat that they are visible as shooting stars. Space rocks smaller than about 80 feet can create spectacular fireballs and generally cause little or no damage. But not always. In 2013, an undetected 66-foot asteroid exploded 14 miles above Chelyabinsk, Russia, releasing 20 to 30 times more energy than the nuclear bomb dropped on Hiroshima. The resulting shock wave shattered windows throughout the city, injuring more than 1,100 people. Scientists expect collisions like the one at Chelyabinsk about once every 60 years.

What about bigger asteroids?
In 1908, a space rock estimated to be 160 to 260 feet wide exploded above an uninhabited part of Siberia, leveling 80 million trees and leaving hundreds of blackened reindeer carcasses across an area twice the size of Los Angeles. If the asteroid had arrived just four hours later, it could have hit and destroyed St. Petersburg. A rock that big strikes Earth once or twice every 1,000 years. The asteroid thought to have wiped out the dinosaurs 65 million years ago was even bigger, measuring 6 to 9 miles in diameter. It smashed into what is now the Gulf of Mexico, triggering massive tsunamis and sending up toxic plumes of sulfur. Collisions that devastating happen about once every 100 million years.

Could we stop an asteroid from hitting?
In theory. But unlike in the movies, it would be pointless to try to blow up the approaching rock. As hardy remnants of the formation of our solar system, asteroids have survived countless collisions in space. Some scientists think that if you blew apart an asteroid, the gravitational pull of its core would force the rock back together. By one estimate, it would take a nuclear weapon 4,000 times more powerful than the biggest nuke ever created to totally destroy an asteroid double the size of the one that killed the dinosaurs. A better approach would be to try to nudge the asteroid off course.

How would that work?
A nuclear explosion about 1,000 feet from the asteroid would probably do the trick. A custom spacecraft would deliver the payload, but NASA won't be testing the concept anytime soon, because deploying nuclear weapons in space is both risky and banned by international law. Another option is to use a spacecraft as a battering ram, a method NASA will experiment with in 2021 when it launches a probe against a nonthreatening asteroid. We could also try to subtly redirect an asteroid using the gravity of a spaceship flying close by for an extended period of time, a so-called gravity tractor. Even a tiny nudge could alter an asteroid's trajectory by thousands of miles over time. But it would take at least a year to chart the trajectory of an asteroid to ensure our craft reached its target. With only a few months' lead time, the best we could manage when faced with a "city killer" would be mass evacuations, a scenario NASA and FEMA already run drills for. "These events are not rare; they happen," NASA Administrator Jim Bridenstine told a Planetary Defense Conference earlier this year. "This is not about movies. This is about ultimately protecting the only planet we know right now to host life."

Doomsday scenarios
An impact from an asteroid that's more than about a half-mile wide would be a global catastrophe. Even on the small end, an asteroid of that size would destroy everything within hundreds of miles of ground zero, triggering massive earthquakes and fires. The dust and smoke sent into the atmosphere would darken the skies for months, plunging the Earth into a mini ice age, causing worldwide crop failures. An asteroid similar in size to the one that doomed the dinosaurs would probably trigger mass extinctions, blot out the sun entirely for months, and kill billions of humans. Still, some scientists think that those who didn't perish in the initial blast or die in the subsequent global famine might stand a chance at long-term survival. University of Colorado geoscientist Brian Toon estimates that it would take an asteroid 60 miles wide to fully obliterate the human race. "That," he says, "would incinerate everybody."