In an article published on the Hava Books website, dedicated to the publication of Rabbi Shlomo Aviner's books and articles, Rabbi Aviner explains that, in principle, the immediate execution of a terrorist is justified, even mandated, by Torah law. Emphasizing that ultimately it is the military that decides on its operational directives, the rabbi provides two explanations of his position that killing a terrorist, wounded or not, is a Torah imperative:



"First of all, the objective of the terrorists is not to carry out a single murder, rather, they want to kill more and more. Therefore, as long as he is alive, we do not know what will occur; he may heal, be freed from jail and kill again. We have already seen many times that terrorists freed in various exchanges were recaptured trying to attack again.... And the second reason [to kill the wounded terrorist] is so that 'they will see and be afraid'; that is, deterrence. If a terrorist knows that in prison he will receive pleasant, appropriate treatment, after which he will be released as a national hero, then the element of deterrence is gone."



In the article, Rabbi Aviner also addresses the morality behind the Torah position, as he sees it:



"It is not enough to preach lessons on morality while allowing evil to run wild and fill the world with widows and orphans. Morality is to fight the war against the murderers! The murderers are fighting against the world of morality by various means, including psychology. They present themselves as moral and the forces fighting against them as immoral. Therefore, a strong stand must be taken against this [phenomenon]; to the contrary, it is extremely moral to fight and wipe out terrorism.



More about the original incident can be read here.