In Arthur C. Clarke's intriguing novel Rendesvous with Rama, an asteroid impact on Venice led to the world government creating an agency called Spaceguard that was tasked to prevent a catastrophic asteroid impact on the current world.
In modern times, the U.N. has just approved a plan to create an international union of space agencies to create an organization for tracking, predicting, and potentially diverting dangerous asteroids.
Truth is not stranger than science fiction - it's just modern-day reality.
World's space agencies unite to save planet Earth
"The plan aims to create an International Asteroid Warning Network so countries can share what they know about asteroids. It will also organise groups of scientists’ from various space agencies to think up ways in which smaller asteroids can be diverted away from Earth."See? It's true. The Daily Mail article indicates that different types of asteroid diversion technologies are being investigated.
Let's hope if we need one to work, it will.