The discovery of what appears to be a large crater caused by an asteroid impact on Jupiter provides a graphic illustration of the destructive potential of this type of cosmic event. Sixty-five million years ago, the reign of the dinosaurs was brought to a fiery end by a cataclysmic impact with a 10km-wide asteroid. It will happen again – we just don't know when. However, for the first time in earth's history, one species – the human race – can to do something about it.

There are two steps to averting cosmic disaster. First, we must search for objects which cross earth's orbit, named Near Earth Objects (NEOs). Anything bigger than about 30m should concern us. The comet that exploded in the high atmosphere over Siberia in June 1908, incinerating an area almost exactly the size and shape of London, was less than 75m in diameter. So, it's important we catalogue all NEOs of this size and above. Over 10 years, half a dozen large, ground-based telescopes located around the world and dedicated to the task, could create a fairly complete list of dangerous objects.

Step two is not to destroy them! That works in Hollywood, but it's a dreadful strategy in the real world. Blowing them up simply turns one dangerous object into a deadly storm shower of millions of smaller objects, which would torch a wide area of the earth's surface. It's smarter to keep the NEO intact and give it a "nudge". And because Earth is only 13,000km across, all we have to do is nudge it 7,000km or more to the left or the right or up or down and we're saved.

How do we "nudge" an NEO? Well, there are several alternatives. We can use a rocket like a tug literally to push the NEO into a slightly different orbit. It's feasible to spot the objects 10 or 20 years before their orbits cause them to impact with us. With enough warning, even a change in direction of just 1cm per second achieves the required change in orbit. The nudge could perhaps be achieved with a nuclear explosion to vaporise part of the NEO, the jet of superheated material shoving the object out of harm's way. But that is risky. We could end up smashing it to a billion bits and causing a subsequent rain of death instead.

Some objects may be giant collections of dust and rocks held together loosely by their own weak gravity. Then, we'd have to sling a big cosmic "bin bag" around them and tow them to a new orbit. That's complicated, but it can be done.

The main thing to realise is that we have the technology to do all this now. But do we have the political will? That's the biggest unknown.

The haunting reality is that if we don't invest what I estimate to be £120m to search for these objects, and up to £50bn to divert them, we face the very real possibility of going the same way as the dinosaurs. It's sobering to think we could save the world from Armageddon for less than it cost to save RBS from bankruptcy. But at present, the political will simply isn't there.