In June 2018 following the successful vote of no confidence against Mariano Rajoy, Robles was appointed Minister of Defence by the new Prime Minister Pedro Sánchez.