If the asteroid Apophis were to collide with Earth 30 years from now, it would strike with the force of 57,000 Hiroshima bombs. The aircraft-carrier-size rock could wipe out a city the size of Los Angeles and cause a 30-foot tsunami to smack into southern California. There’s only a 1 in 5,500 chance of impact, but it’s a chance that NASA is not willing to take.

So in late October, the space agency outlined a three-phase plan to observe, track, and deflect the rogue rock over the next two decades. The announcement came on the heels of new radar readings-taken in August by the Arecibo Observatory radio telescope in Puerto Rico-that eliminated all potential collision dates with the exception of one. In 2029, Apophis will pass within 20,000 miles of Earth, so close that our planet’s gravitational pull will alter the asteroid’s orbit and possibly send it hurtling toward Earth. Predicted impact date: April 13, 2036.

Thirty years sounds a lot of time, but NASA’s new plan cuts it pretty close. This spring, Apophis’s orbit will put it back within range of the Arecibo telescope, and then again in January 2013. In NASA’s best-case scenario, the new radar data will rule out the possibility of an impact altogether. If not, it’s on to phase two: Plant a radio transponder on Apophis in 2019, and track the asteroid’s trajectory for a full year. If the asteroid is still a threat, an unmanned spacecraft will rendezvous with Apophis by 2028 and shotgun a kinetic-energy impactor into the space rock to nudge it off course.

The only problem is, there’s not much room for error-after 2029, the asteroid would have to be moved too great a distance to avert a cosmic collision. This is one mission NASA will have to do just right.