It is written (Joshua 7:19): "And Joshua said to Achan" etc. Achan said to him: Because of this thing that you are saying to me, am I to die? When Achan saw this, he said in his heart: Now I shall be caught by the lot, and I will not be believed, and I shall be reckoned a liar before Joshua. At that moment Achan said to Joshua: Why do you cast lots between me and my household? Let me cast the lot between you and Phinehas; if the lot does not come up upon the two of you, then I too shall believe. At that moment "Joshua said to Achan: My son, give, I pray you, glory to the LORD, the God of Israel, and make confession to Him, and tell me, I pray you, what you have done" (ibid.). Achan said to Joshua: You too, tell me what you have done. Immediately discord fell upon Israel, and the tribe of Judah rose up in strife, and they killed of Israel group after group. When Achan saw this, he said in his heart: Whoever sustains a single soul of Israel, it is as though he had sustained an entire world; and through me several men of Israel have been killed. I am a sinner and one who causes others to sin. It is better that I confess my transgression before the Holy One, blessed be He, and before Joshua, and that no ruin come about through me. What did Achan do? He stood and made his voice heard, and the whole congregation fell silent before him. He said to Joshua: "Truly I have sinned against the LORD, the God of Israel, and thus and thus have I done" (ibid., v. 20) — and not this alone, for I have already acted faithlessly in other matters. Joshua said to him: I too knew that the matter depended upon you. "And tell me, I pray you, what you have done; hide it not from me" (ibid., v. 19). "And I saw among the spoil" (ibid., v. 21) — [he said to him:] I saw what is written in the Torah, "And you shall eat the spoil of your enemies" (Deuteronomy 20:14) — "a goodly Shinar mantle" etc. (Joshua, ibid.). And do not say that I am poor and was in need, for there is none in the tribe of Judah richer than I. Immediately "Joshua sent messengers, and they ran to the tent" etc. (ibid., v. 22). Why did Joshua send them? So that the tribe of Judah would not steal them and add to the discord; therefore Joshua sent in haste. "And they brought them to Joshua and to all the children of Israel, and they laid them out before the LORD" (ibid., v. 23). What is "and they laid them out"? Joshua said: Master of the Universe, was it over these that You were angry with Your children? Behold, they are set before You. Immediately "Joshua took Achan son of Zerah" etc. [and his sons and his daughters and his ox and his ass] (ibid., v. 24): his sons and his daughters — in order to chasten them; and his ox and his ass and his tent — for burning. "And all Israel with him" (ibid.) — to see his judgment, so that they would not be accustomed to act so. "And they brought them up to the Valley of Achor" (ibid.). "And Joshua said: Why have you troubled us? [The LORD shall trouble you] this day" (ibid., v. 25) — this day he is troubled, yet he has a portion in the world to come. "And all Israel stoned him with stones" (ibid.) — him alone; "and they burned them with fire" (ibid.) — Scripture speaks of his property, for so it had been said to him by the mouth of the Almighty: "And it shall be that he who is taken with the proscribed thing shall be burned with fire, he and all that he has" (ibid., v. 15). Rather, this is to teach you that Achan confessed that he had stolen them on the Sabbath, and brought them out of Jericho and hid them inside his tent; and he was stoned for profaning the Sabbath, and burned because he had trespassed against the proscribed thing. And whence do you find this? For thus the Holy One, blessed be He, said to Joshua: "See, I have given into your hand Jericho and its king, the mighty men of valor. And you shall encircle the city, all the men of war, going around the city one time; thus shall you do six days. And seven priests" etc. (ibid. 6:2–4) — to teach you that Jericho was conquered on the Sabbath. And this thing Joshua did of his own accord, and the Holy One, blessed be He, agreed with him. Joshua said: The Sabbath is holy, as it is said, "And you shall keep the Sabbath, for it is holy to you" (Exodus 31:14); and all that we conquer on it shall be holy, as it is said, "And all the silver and gold and vessels of bronze [and iron are holy to the LORD]" (Joshua 6:19). And whence that He agreed with him? As it is said, "[And the city] shall be proscribed, it and all that is in it, to the LORD" (ibid., v. 17). At that moment "the LORD turned from His fierce anger" (ibid. 7:26). And concerning him it is said, "The wrath of a king is messengers of death, but a wise man will appease it" (Proverbs 16:14) — this is Joshua, who turned away the fierce anger of the LORD from Israel.
Achan's Confession and the Sabbath Conquest of Jericho
Midrash Tanchuma Buber, Masei 4:1
כתיב ויאמר יהושע אל עכן וגו' (יהושע ז יט). אמר לו עכן בשביל דבר זה שאתה אומר אלי אני מת, כיון שראה עכן כך, אמר בלבו עתה אלכד בנורל ולא אאמן ואחשב כזבן לפני יהושע, באותה שעה אמר עכן ליהושע, על מה אתה מפיל גורלות ביני ובית ביתי, אפיל הגורל בינך ובין פינחס, אם לא יעלה הגורל על שניכם אף אני מאמין, באותה שעה (אמר) [ויאמר] יהושע (לעכן) [אל עכן] בני שים נא כבוד לה' אלהי ישראל ותן [לו] תודה והגד נא לי מה עשית (שם), א"ל עכן ליהושע אף אתה הגד לי מה עשית, מיד נפלה מחלוקת בישראל, ועמדו שבט יהודה במריבה, והרגו מישראל כיתות כיתות, כיון שראה עכן כך, אמר בלבו כל המקיים נפש אחת מישראל כאילו קיים עולם מלא, ואני על ידי נהרגו כמה אנשים מישראל, אני הוא חוטא ומחטיא, מוטב שאודה פשעי לפני הקב"ה ולפני יהושע ולא תבא קלקלה על ידי, מה עשה עכן עמד והשמיע קולו והסו כל הקהל לפניו, אמר ליהושע אמנה אנכי חטאתי לה' אלהי ישראל וכזאת וכזאת עשיתי (שם שם כ), ולא זאת בלבד, שכבר מעלתי באחרות, א"ל יהושע ואני כך הייתי י ודע שהדבר תלוי בך, והגד נא לי מה עשית אל תכחד ממני (שם שם יט), וארא בשלל (שם שם כא), [אמר ליה] ראיתי מה כתיב בתורה ואכלת את שלל אויביך (דברים כד יד), אדרת שנער וגו' (יהושע שם), ואל תאמר שאני עני והייתי צריך, שאין בשבט יהודה עשיר ממני, מיד וישלח יהושע מלאכים וירוצו האהלה וגו' (שם שם כב), מפני מה שלח אותם יהושע, כדי שלא יגנבו אותם שבט [יהודה] ויוסיפו במחלוקת, לפיכך שלח יהושע מהרה, ויביאום אל יהושע ואל כל בני ישראל ויציקם לפני ה' (שם שם כג), מהו ויציקום, אמר יהושע רבש"ע על אלו כעסת על בניך, הרי הם נתונים לפניך, מיד ויקח יהושע את עכן בן זרח וגו' [ואת בניו ואת בנותיו ואת שורו ואת חמורו] (שם שם כד), את בניו ואת בנותיו כדי לרדותן, ואת שורו ואת חמורו ואת אהלו לשריפה, וכל ישראל עמו (שם), לראות בדינו כדי שלא יהו רגילין לעשות כן, ויעלו אותם (אל) עמק עכור (שם). ויאמר יהושע מה עכרתנו [יעכרך ה'] (היום הזה) [ביום הזה] (שם שם כה), היום הזה הוא עכור ויש לו חלק לעולם הבא, וירגמו אותו כל ישראל אבן (שם), הוא לבדו, וישרפו אותם באש (שם), בממונו הכתוב מדבר, שכן נאמר לו על פי הגבורה, והיה הנלכד בחרם ישרף באש אותו ואת כל אשר לו (שם שם טו), אלא ללמדך שהודה עכן שבשבת גנב אותם, והוציא מיריחו והטמין בתוך אהלו, ונסקל על חילול שבת, ונשרף על שמעל בחרם, ומנין אתה מוצא, שכן הקב"ה אמר ליהושע, ראה נתתי בידך את יריחו ואת מלכה גבורי החיל, וסבותם את העיר כל אנשי המלחמה הקיף את העיר פעם אחת, כה תעשה ששת ימים, ושבעה כהנים וגו' (שם ו ב ג ד), ללמדך שבשבת נכבשה יריחו, ודבר זה עשה יהושע מדעתו, והסכים הקב"ה על ידו, אמר יהושע השבת קודש, שנאמר ושמרתם את השבת כי קדש הוא לכם (שמות לא יד), וכל מה שכבשנו בה יהא קדש, שנאמר וכל כסף וזהב וכלי נחשת [וברזל קדש הוא לה'] (יהושע ו יט), ומנין שהסכים על ידו, שנאמר [והיתה העיר] חרם היא וכל אשר בה לה' (שם שם יז), באותה שעה וישב ה' מחרון אפו (שם ז כו), ועליו נאמר חמת מלך מלאכי מות ואיש חכם יכפרנה (משלי טז יד), זה יהושע שהשיב חרון אף ה' מישראל.