The head of the NASA planetary defense department suggested that a nuclear explosion a few hundred meters from the surface of an incoming asteroid could be the best way to prevent an impact. According to Lindley Johnson, the detonation of a nuclear device at a sufficient distance from the asteroid will allow changing its trajectory.
A nuclear explosion leads to an overheating of the asteroid's surface and will give it strength in the opposite direction. However, in this process it is unacceptable to hit the rocket in the object itself, otherwise it will shatter into pieces, which will rush to Earth.
Lindley Johnson at NASA Headquarters (Washington)
So far, the Coordinated Planetary Defense Bureau has not conducted tests of nuclear weapons in space. But now they are preparing to change the trajectory of the asteroid. In November 2022, a double asteroid redirection test (DART) should take place. The device will try to move the asteroid Didim off course.
NASA looks after dangerous asteroids
If NASA manages to notice a potentially dangerous asteroid at an early stage, then only a small change in its trajectory will be needed to protect the Earth. The agency has been engaged in near-earth object mapping for many years. These are asteroids and comets, whose orbits relate to the inner solar system within 195 million km from the Sun and 50 km from the Earth's orbit.