Humanity might not be safe even if we tackle challenges like global climate change and perpetual war. An asteroid could fall out of the sky and knock us back into the stone age, or worse, end our brief reign on this planet. NASA and the National Nuclear Security Administration (NNSA) are working on a new spacecraft design that could potentially deflect a dangerous asteroid before that happens. The craft is called “HAMMER,” and it does what the name implies.

HAMMER, which stands for Hypervelocity Asteroid Mitigation Mission for Emergency Response, has two modes. In its preferred mode of operation, it would act as an impactor that collides with the asteroid to gently nudge it off course, so it doesn’t hit the planet. If there’s not enough time for that, HAMMER’s other option is to detonate a nuclear weapon in order to destroy or deflect the object. That’s where the NNSA’s involvement is key.

In a new study, NASA used the asteroid Bennu as a hypothetical test for the HAMMER program. The agency’s OSIRIS-REx mission is closing in on the space rock with the aim of collecting a sample from its surface later this year. Researchers used the trajectory calculations of OSIRIS-REx for the hypothetical HAMMER mission. This wasn’t just a shortcut for the sake of sending time. There’s a small 1-in-2,700 chance that Bennu could collide with Earth in 2035. The 1,600 foot (487 meters), 74 billion pound (33.5 billion kilograms) space rock would produce a 1.15 gigaton explosion if it struck Earth. That’s about 23 times larger than the most powerful hydrogen bomb ever detonated, and it’s far from the biggest asteroid out there.

Each HAMMER spacecraft would weigh 8.8 tons. With a planned impact speed of 22,000 miles per hour, it could impart a lot of force. Still, one probe isn’t going to deflect even a modestly sized asteroid like Bennu. NASA suggests deploying a small fleet of HAMMER probes in the path of an Asteroid. Over the course of multiple impacts, the asteroid slows down slightly, and its orbital trajectory bends toward the sun. According to the study, this would be enough to steer Bennu away from an Earth impact.

If we don’t know about an impact years in advance, it might be impossible to alter the asteroid’s course early enough. That’s why HAMMER also has a nuclear mode. The analysis says current US nuclear weapons are sufficiently powerful to knock an object like Bennu off course. Overall efficacy won’t be clear until we get a closer look at Bennu’s makeup. OSIRIS-REx will deliver a sample to Earth in 2023.