It must have been amazing sight 66 million years ago for the dinosaurs to look up and see a giant rock, of order the length of Manhattan (7–50 miles in diameter), getting bigger and bigger in the sky. But the fun would have stopped when the rock hit the ground and blasted out the enormous Chicxulub crater, 93 miles in diameter, off the Yucatán Peninsula in Mexico. The human species did not exist back then and might not have existed today if not for the mass extinction that resulted from this impact.

But there is hope that a similar extinction event will not repeat in our future, because science can shield us from catastrophes. If the dinosaurs had had telescopes, they could have identified the approaching rock and perhaps deflected it to miss the Earth. In principle, astronomy can save lives.

With this in mind, the U.S. Congress tasked NASA to identify 90 percent of all objects larger than 140 meters that pose a risk from a collision with Earth, the so-called near-Earth Objects (NEOs). The Pan-STARRS telescope started to address this challenge, and, while surveying the sky, discovered `Oumuamua, establishing our first encounter with an interstellar object.

But what was the origin of the Chicxulub impactor that triggered the Cretaceous–Tertiary (K–T) extinction of three-quarters of the plant and animal species on Earth? Until now, its source was a mystery. Astronomers calculated that the impact rate of main-belt asteroids and long-period comets would be too low to explain the relative recency of the Chicxulub event.

In a new paper with my student Amir Siraj, we show that a fraction of these long-period comets from the outskirts of the solar system can be broken into pieces when they pass near the sun. Their breakup produces a collection of small fragments that cross the orbit of the Earth. We found that this population of shrapnel increases by an order of magnitude the impact rate of giant rocks on Earth, making it consistent with the age of the Chicxulub crater. The cometary origin of the Chicxulub impactor also explains the composition of the largest confirmed impact crater on Earth, Vredefort—which is twice the size of the Chicxulub crater. In addition, the shrapnel model implies that fragments smaller by an order of magnitude than the Chicxulub impactor should strike the Earth every million years, explaining why the Zhamanshin crater, which is 10 times smaller than the Chicxulub crater, formed within the last million years and has cometary composition.

How can we mitigate the risk from solar system shrapnel? Within three years, the Vera C. Rubin Observatory in Chile will start operating the largest CCD camera ever built with 3.2 gigapixels. It will survey the sky with an 8.4-meter primary mirror, producing 30 terabytes of data each night. The resulting Legacy Survey of Space and Time (LSST) will identify 60 percent of all NEOs larger than 140 meters, bringing us two thirds of the way to the congressional target.

If a dangerous NEO is identified, we could use various strategies to deflect it so that it will miss the Earth. The deflection techniques include initiating a billiard-like kick from impact of a projectile; gravitational shepherding by a massive spacecraft; painting the NEO on one side to increase the radiation pressure of the sun; and using various options, like shining a laser or an ion beam on it, focusing sunlight on it, attaching an engine to it or exploding a bomb on its surface, all to nudge the NEO orbit away from Earth through the rocket effect of evaporating gases. Which approach we choose will depend on the size and composition of the object.

Clearly, size is not a measure of fitness. The small brain of a human can be more valuable for survival than the giant body of a dinosaur. Science is our most precious advantage relative to the dinosaurs that predated us.

But our advantage also brings a sense of responsibility for the future of our planet. Science thrives through collaboration across the globe without the barriers imposed by borders or national identities. The main risks to our existence do not stem from rocks falling from the sky but from our own actions. The biggest challenge we face is how to promote long-term survival rather than arrive at the brink of self-extinction through the technologies we enable.