Joshua 7:5-8

7:5 The men of Ai killed about thirty-six of them and chased them from in front of the city gate all the way to the fissures and defeated them on the steep slope. The people’s courage melted away like water.

7:6 Joshua tore his clothes; he and the leaders of Israel lay face down on the ground before the ark of the Lord until evening and threw dirt on their heads. 7:7 Joshua prayed, “O, Master, Lord! Why did you bring these people across the Jordan to hand us over to the Amorites so they could destroy us? 7:8 If only we had been satisfied to live on the other side of the Jordan! O Lord, what can I say now that Israel has retreated before its enemies?

Joshua 7:12

7:12 The Israelites are unable to stand before their enemies; they retreat because they have become subject to annihilation. I will no longer be with you, unless you destroy what has contaminated you.