וַנִּלְכֹּ֤ד אֶת־כָּל־עָרָיו֙ בָּעֵ֣ת הַהִ֔וא וַֽנַּחֲרֵם֙ אֶת־כָּל־עִ֣יר מְתִ֔ם וְהַנָּשִׁ֖ים וְהַטָּ֑ף לֹ֥א הִשְׁאַ֖רְנוּ שָׂרִֽיד׃
그 때에 우리가 그 모든 성읍을 취하고 그 각 성읍을 그 남녀와 유아와 함께 하나도 남기지 아니하고 진멸하였고
Mishneh Torah, Kings and Wars
If they do not come to peaceful terms or they make peace but do not accept the Seven Commandments, we engage in war against them and slay all their adult males. We take all their money and children as spoils. We do not kill the women or minors, as it says, “the women and the children” (see Deut. 20:14 and 2:34) which means the male children. To what do we refer? To a Discretionary War with one of the other nations. However, with one of the Seven Nations or with Amalek who do not make peace, we leave no soul alive, as it says, “so you shall do with everyone…only of the cities of the nations…do not leave alive any soul” (Deut. 20:15-16), and regarding Amalek it says, “erase the memory of Amalek” (Deut. 25:19). How do we know that this is referring to those who do not make peace with us? For it says, “there was no city which came to peace with the Children of Israel except the Chivites, dwellers of Givon. Everything, they took in the war. For from G-d their hearts were strengthened to the call of war with Israel, so that they may be destroyed.” (Joshua 11:19-20). They were offered peace, and refused.