Vayikra / Leviticus 26:6 · Drash
וְנָתַתִּי שָׁלוֹם בָּאָרֶץ וּשְׁכַבְתֶּם וְאֵין מַחֲרִיד וְהִשְׁבַּתִּי חַיָּה רָעָה מִן־הָאָרֶץ וְחֶרֶב לֹא־תַעֲבֹר בְּאַרְצְכֶם׃
And I will give peace in the land, and you will lie down with none to make you afraid, and I will remove the wild beast from the land, and no sword will pass through your land.
Drash דְּרָשׁ
The sword that came in peace
You are sure you are doing right, and you even know a verse that backs you up. Do you still need to ask for advice?
The Talmud tells: King Yoshiyahu (Josiah) read in our verse that even a peaceful sword would not pass through the land, and went out against Pharaoh Necho, who was passing by. He did not take counsel with the prophet Yirmeyahu (Jeremiah) and did not know that his generation was not worthy of it. As he was dying, he accepted the justice of the judgment upon himself.
How Talmud, Taanit explain it
Talmud, Taanit And no sword will pass through your land
On the sword. Our rabbis taught: the sword they spoke of is not only a sword that does not come in peace, but even a sword that comes in peace. For there is no sword more peaceful than that of Pharaoh Necho, and yet King Yoshiyahu stumbled over it, as it says: "And he sent messengers to him, saying: What have I to do with you, king of Judah? Not against you do I come today, but against the house with which I am at war, and God told me to hurry. Do not oppose the God who is with me, so that He does not destroy you" (Divrei HaYamim II / II Chronicles 35:21). What is "the God who is with me"? Rav Yehudah said in the name of Rav: this is idolatry. Yoshiyahu said: since he relies on idolatry, I can defeat him.
"And the archers shot at King Yoshiyahu, and the king said to his servants: Carry me away, for I am badly wounded" (Divrei HaYamim II / II Chronicles 35:23). What is "badly wounded"? Rav Yehudah said in the name of Rav: this teaches that they made his whole body like a sieve.
Rabbi Shmuel bar Nachman said in the name of Rabbi Yonatan: why was Yoshiyahu punished? Because he should have taken counsel with Yirmeyahu and did not. Which verse did he expound? "And no sword will pass through your land" (Vayikra / Leviticus 26:6). Which sword? If you say a sword that does not come in peace, it is already written: "And I will give peace in the land"! So even a sword that comes in peace. But he did not know that his generation was not worthy of it.
When he was dying, Yirmeyahu saw his lips moving. He thought: perhaps, heaven forbid, in his pain he is saying something unworthy. He bent down and heard him accepting the justice of the judgment upon himself, saying: "The Eternal is righteous, for I rebelled against His word" (Eichah / Lamentations 1:18). At that hour Yirmeyahu began his lament over him: "The breath of our life, the Eternal's anointed" (Eichah / Lamentations 4:20).
Takeaway
"On the sword" are words of the Mishnah: when a sword passes through the land, the alarm is sounded everywhere, "because it is a plague that travels" (Mishnah Taanit 3:5). The Talmud explains which sword is meant there.
"A sword that comes in peace," Rashi explains, is an army that passes through the land to fight elsewhere. Yoshiyahu went out against Pharaoh Necho and did not let him pass (Rashi on Taanit 22a–22b).
Yoshiyahu was mortally wounded at Megiddo, and all the people mourned him (Divrei HaYamim II / II Chronicles 35:22–25).
In the edition given here, the name of the teacher in whose name Rabbi Shmuel bar Nachman speaks stands in round brackets (יוֹחָנָן): this is how the edition marks a struck word, and it gives no other name. The Talmud's other text names Rabbi Yonatan here (Taanit 22b).
"The Eternal's anointed" (מְשִׁיחַ ה׳) is what Scripture calls a king anointed with oil: so David says of Shaul (Saul) (Shmuel I / I Samuel 24:7).