From 2012 to 2015, Russia researched ways of deflecting Earth-bound asteroids using nuclear weapons and came up with a best-case scenario, The Telegraph reports. The Central Scientific Research Institute of Machine Building, an arm of Russia's state-run Roscosmos space agency, worked on the asteroid problem with other countries (including the United States) in a program called NEOShield, which was largely funded by the European Commission. Note that "NEO" in this case stands for "Near-Earth Object," not The One you're probably imagining.
Russia was tasked with investigating interstellar nuclear-defense options under NEOShield from 2012 to 2015. Its scientists concluded that the safest way to move an asteroid with a nuke would be to carry out the detonation in deep space. This wouldn't destroy the asteroid, but the explosion would hopefully push the giant space rock out of Earth's path.
An international 1967 treaty bans the use of nuclear weapons in space (alongside their ban on Earth), though Russia's researchers believe that the rules would change if an asteroid posed an imminent threat to the planet, Telegraph reports. Russia additionally plans to set up an early-warning center that will use four observation satellites to track asteroids on collision courses with Earth, according to Telegraph.
NASA and the National Nuclear Security Administration have also explored the idea of defensive nukes in space. Earth's most recent, notable asteroid event was in 2013, when a 60-foot, 7,000-ton meteor entered the atmosphere over Chelyabinsk, Russia. Its impact resulted in explosions that injured more than 1,000 people and hospitalized more than 100.