Joshua - Chapter 7
Ai for an Ai
Joshua next sent spies to the city of Ai, which was judged to be small and weak, therefore not requiring many troops. Nevertheless, the army of Ai quickly gained the upper hand. Joshua inquired of G-d as to why this was and G-d informed him that it was because someone looted consecrated property from the conquest of Jericho. A Divinely-inspired lottery narrowed it down by Tribe and family until it was determined that Achan ben Karmi of the Tribe of Judah was the guilty party. He confessed that he had stolen gold, silver and clothes and hidden them in the ground beneath his tent. (He says, "kazos v'kazos asisi" - "like this and like this I have done." The Talmud explains that he was also confessing to having done likewise in battle during the time of Moses.)
The stolen property was uncovered and Achan was executed at G-d's command. (Meilah - appropriation of Temple property - is not normally punishable by death. This was hora'as sha'ah - an extraordinary measure taken as a deterrent, since such actions cause Hashem's presence to depart. As a result of Achan's actions, 36 men died in battle.) While Joshua commanded that Achan be brought to the valley where he would be executed along with his property and family, do not be misled into thinking that his family paid the price for his actions. The Navi says quite clearly that only Achan was stoned. His family had to serve as witnesses, just as other people. Furthermore, the Talmud tells us that, despite his actions, Achan secured his place in the Next World by his confession.