7:1 But the people of Israel broke faith in regard to the devoted things, for Achan the son of Carmi, son of Zabdi, son of Zerah, of the tribe of Judah, took some of the devoted things. And the anger of the Lord burned against the people of Israel.
2 Joshua sent men from Jericho to Ai, which is near Beth-aven, east of Bethel, and said to them, “Go up and spy out the land.” And the men went up and spied out Ai. 3 And they returned to Joshua and said to him, “Do not have all the people go up, but let about two or three thousand men go up and attack Ai. Do not make the whole people toil up there, for they are few.” 4 So about 3,000 men went up there from the people. And they fled before the men of Ai, 5 and the men of Ai killed about thirty-six of their men and chased them before the gate as far as Shebarim and struck them at the descent. And the hearts of the people melted and became as water.
6 Then Joshua tore his clothes and fell to the earth on his face before the ark of the Lord until the evening, he and the elders of Israel. And they put dust on their heads. 7 And Joshua said, “Alas, O Lord God, why have you brought this people over the Jordan at all, to give us into the hands of the Amorites, to destroy us? Would that we had been content to dwell beyond the Jordan! 8 O Lord, what can I say, when Israel has turned their backs before their enemies! 9 For the Canaanites and all the inhabitants of the land will hear of it and will surround us and cut off our name from the earth. And what will you do for your great name?” (ESV)