But the children of Israel committed a trespass regarding the accursed things, for Achan the son of Carmi, the son of Zabdi, the son of Zerah, of the tribe of Judah, took of the accursed things; so the anger of the LORD burned against the children of Israel.
Now Joshua sent men from Jericho to Ai, which is beside Beth Aven, on the east side of Bethel, and spoke to them, saying, “Go up and spy out the country.” So the men went up and spied out Ai. And they returned to Joshua and said to him, “Do not let all the people go up, but let about two or three thousand men go up and attack Ai. Do not weary all the people there, for the people of Ai are few.” So about three thousand men went up there from the people, but they fled before the men of Ai. And the men of Ai struck down about thirty-six men, for they chased them from before the gate as far as Shebarim, and struck them down on the descent; therefore the hearts of the people melted and became like water.
Then Joshua tore his clothes, and fell to the earth on his face before the ark of the LORD until evening, he and the elders of Israel; and they put dust on their heads. And Joshua said, “Alas, Lord GOD, why have You brought this people over the Jordan at all—to deliver us into the hand of the Amorites, to destroy us? Oh, that we had been content, and dwelt on the other side of the Jordan! O Lord, what shall I say when Israel turns its back before its enemies? For the Canaanites and all the inhabitants of the land will hear it, and surround us, and cut off our name from the earth. Then what will You do for Your great name?”
So the LORD said to Joshua: “Get up! Why do you lie thus on your face? Israel has sinned, and they have also transgressed My covenant which I commanded them. For they have even taken some of the accursed things, and have both stolen and deceived; and they have also put it among their own stuff. Therefore the children of Israel could not stand before their enemies, but turned their backs before their enemies, because they have become doomed to destruction. Neither will I be with you anymore, unless you destroy the accursed from among you.