Rabbi Akiva says: The ban is the oath and the oath is the ban. Whoever breaks the oath is as one who breaks the ban, and one who breaks the ban breaks the oath. And whoever knows a matter and does not tell it, the ban comes upon him and consumes him and his timber and his stones, as it is said, "I send it forth, says the LORD, and it shall come to the house of the thief and to the house of the one who swears falsely by My name, and it shall lodge within his house and consume it, its timber and its stones" (Zechariah 5:4). Know the power of the ban: come and see from Joshua bin Nun, who placed Jericho and all that was in it under the ban. Achan was there, and he saw the teraphim and the silver they were offering before it, and the mantle spread before it, and one tongue of gold that was within its mouth, and he coveted them in his heart and took them, and went and buried them in his tent. And on account of his trespass thirty-six men died. Joshua went and rent his garments and fell on his face to the ground before the Ark of the Covenant. He sought repentance, and the Holy One, blessed be He, was reconciled to him and said to Joshua, The children of Israel have trespassed in the ban, as it is said, "Israel has sinned" (Joshua 7:11). Joshua looked at the twelve stones upon the High Priest that correspond to the twelve tribes; each tribe that had done a righteous deed, its stone would brighten its light, and each tribe that had done a transgression, its stone would dim its light. He saw that the stone of Judah was dimming its light, and he knew that the tribe of Judah had trespassed in the ban. He cast lots among them and Achan was taken. Joshua took Achan and the silver and the mantle and the tongue [of gold] and his sons and his daughters and all that was his, and brought them up to the Valley of Achor. And it is written, "Fathers shall not be put to death for sons, and sons shall not be put to death for fathers" (Deuteronomy 24:16); but because they knew of the matter and did not tell, he stoned them and burned them. If stoning, why burning, and if burning, why stoning? Rather, stoning because they knew of the matter and did not tell, burning because righteous men were killed on his account. And because he gave thanks to the great Name of the Holy One, blessed be He, he has a portion in the world to come, as it is said, "The LORD shall trouble you this day" (Joshua 7:25): this day you are troubled, but you are not troubled in the world to come.
Rabbi Akiva on the Ban That Is an Oath and Its Power
Yalkut Shimoni on Nach 18:3
רבי עקיבא אומר החרם הוא השבועה והשבועה הוא החרם וכל מי שהוא מפר השבועה כאלו מפר את החרם והמפר את החרם מפר את השבועה. וכל מי שיודע דבר ואינו מגיד החרם בא עליו ומכלה אותו ואת עציו ואת אבניו, שנאמר והוצאתיה נאם ה' ובאה אל בית הגנב ואל בית הנשבע בשמי לשקר ולנה בתוך ביתו וכלתו ואת עציו ואת אבניו, תדע לך כח החרם בא וראה מיהושע בן נון שהחרים את יריחו ואת כל אשר בה והיה שם עכן וראה את התרפים ואת הכסף שהיו מקריבין לפניו ואת האדרת שהיתה פרוסה לפניו ולשון זהב אחת שהיתה לתוך פיו וחמד אותם בלבו ולקחם והלך וטמנם בתוך אהלו ועל מעלו שמעל מתו ששה ושלשים איש והלך יהושע וקרע בגדיו ונפל על פניו ארצה לפני ארון הברית, הוא בקש תשובה ונתרצה לו הקב"ה ואמר ליהושע מעלו בני ישראל בחרם שנאמר חטא ישראל, ואה יהושע בשתים עשרה אבנים שעל כהן גדול שהם כנגד י"ב שבטים וכל שבט ושבט שהיה עושה דבר של צדקה היתה אבנו מגביה את אורה וכל שבט ושבט שהיה עושה דבר של עבירה היתה אבנו מכהה את אורה וראה שהיתה אבנו של יהודה מכהה את אורה וידע ששבט יהודה מעל בחרם והפיל גורלות ביניהם ונלכד עכן ולקח יהושע את עכן ואת הכסף ואת ואת האדרת ואת הלשון ואת בניו ואת בנותיו ואת כל אשר לו והעלם לעמק עכור. וכתיב לא יומתו אבות על בנים ובנים לא יומתו על אבות אבל על שידעו בדבר ולא הגידו סקלם ושרפם. אם סקילה למה שרפה ואם שרפה למה סקילה, אלא סקילה על שידעו בדבר ולא הגידו שרפה על שנהרגו עליו אנשים צדיקים, ועל שנתן הודיה לשמו הגדול של הקב"ה יש לו חלק לעוה"ב, שנאמר יעכרך ה' היום הזה, היום הזה אתה עכור ואי אתה עכור לעולם הבא: