Judaism does not subscribe to the idea that one should “turn the other cheek” when attacked. In fact, one important rule taught by the Talmud is ha-ba le-horgekha, hashkem le-horgo – if someone comes planning to kill you, you should hurry to kill him first.
This rule is applied by our Gemara to the case of a ba ba-maḥteret – someone who comes at night to rob someone. According to the Mishna, he can be killed al shem sofo – because of what will happen in the end. Rava explains this to mean that people do not willingly allow others to take their money, so the robber knows that the person he is robbing will defend his property. We assume, therefore, that the robber will be prepared to kill him. Recognizing this, Rava teaches that the Torah instructs ha-ba le-horgekha, hashkem le-horgo.
While Rava presents this rule as being well established in the Torah, he does not offer a source, and it is not clear where, in fact, does the Torah teach this rule?
The Midrash Tanḥuma says that we learn this rule from the commandment (Bamidbar 25:17-18) given to Moshe telling the Jewish People to harass and smite the Midianites; the explanation given for this is that they harass and plan against you. Thus we see that their plans make them liable to be fought and defeated.
The Ramah raises the issue that this case is not a normal case of rodef – someone who is chasing after another person to kill him, who can be killed by anyone – since the robber is not directly threatening the owner of the property; it is only his response to the owner of the property who is defending himself that creates the threat. The Ramah explains that we nonetheless view the robber as a rodef since he knows that his actions will instigate the threat against his own life. We therefore view him as being the one who is threatening.