Deflecting potentially dangerous asteroids may not be an easy task due to the complexity of the system, as well as challenges such as monitoring and defining their future orbit, which can often be very sensitive to encounters with massive planets. Over the years, many proposals have been made to face the challenges and even deflect the asteroid from a possible collision with Earth. Within this scenario, we are proposing the use of the kinetic impact deflection technique combined with gravitational perturbations from the Earth. We assume the following scenario: the asteroid will have a closest approach to Earth and will move away again; however, in its next closest approach to Earth, it will collide with it. The proposal is to take advantage of the first maximum approach between the asteroid and the Earth, to apply a velocity variation on the asteroid that will have its effect intensified by the Swing-By with Earth. We will take the opportunity to understand how the planets can influence the results. Our results show that planets can change the results significantly. Another interesting result is that the minimum impulse to avoid Apophis collision has the magnitude of − 5 mm/s. © 2023, The Author(s), under exclusive licence to EDP Sciences, Springer-Verlag GmbH Germany, part of Springer Nature.