As I wrote in "John Locke: Theft as the Little Murder" in his 2d Treatise on Government: On Civil Government, John Locke often used murder as a metaphor for other crimes. In section 16 of his 2d Treatise on Government: “On Civil Government,” he uses a similarly extreme case to bolster the legitimacy of punishment: considering the case of a determined, deadly, and irreconcilable enemy and comparing such an enemy to a dangerous lion or wolf:
The state of war is a state of enmity and destruction: and therefore declaring by word or action, not a passionate and hasty, but a sedate settled design upon another man’s life puts him in a state of war with him against whom he has declared such an intention, and so has exposed his life to the other’s power to be taken away by him, or any one that joins with him in his defence, and espouses his quarrel; it being reasonable and just, I should have a right to destroy that which threatens me with destruction: for, by the fundamental law of nature, man being to be preserved as much as possible, when all cannot be preserved, the safety of the innocent is to be preferred: and one may destroy a man who makes war upon him, or has discovered an enmity to his being, for the same reason that he may kill a wolf or a lion; because such men are not under the ties of the common-law of reason, have no other rule, but that of force and violence, and so may be treated as beasts of prey, those dangerous and noxious creatures, that will be sure to destroy him whenever he falls into their power.
The logic as stated is for a situation of your life or mine. You could walk away and defuse the situation. I cannot, because you would pursue me. So it is legitimate for me to do whatever it takes to incapacitate you so you cannot kill me, including killing you, if that is necessary.
In cases of lesser danger, the significance of this passage is in justifying doing what is necessary to deter someone from preying on the innocent with impunity—especially if that deterrent action harms only the guilty. I discuss the principles for these cases of lesser danger in the two posts