Midrasch zu Dewarim 20:9
וְהָיָ֛ה כְּכַלֹּ֥ת הַשֹּׁטְרִ֖ים לְדַבֵּ֣ר אֶל־הָעָ֑ם וּפָֽקְד֛וּ שָׂרֵ֥י צְבָא֖וֹת בְּרֹ֥אשׁ הָעָֽם׃ (ס)
Und wenn die Offiziere das Reden mit dem Volk beendet haben, werden die Hauptleute der Heerscharen an der Spitze des Volkes ernannt.
Sifrei Devarim
(Devarim 20:9) "And it shall be, when the officers finish speaking to the people, they shall appoint commanders at the head of the people," and at the rear of the people. Sentinels armed with iron staves are posted before and behind them with the authority to "cripple" all who desire to flee, for the beginning of defeat is flight, as it is written (I Samuel 4:17) "Israel fled before the Philistines, and a great 'plague' overtook the people." When is this so? (that all of the aforementioned return?) In an optional war; but in a mandatory war, all go out, even a groom from his chamber and a bride from her bridal canopy.
Ask RabbiBookmarkShareCopy