Deuteronomy 7:26

None of the devoted things shall stick to your hand, that the Lord may turn from the fierceness of his anger and show you mercy and have compassion on you and multiply you, as he swore to your fathers,

“But no devoted thing that a man devotes to the Lord, of anything that he has, whether man or beast, or of his inherited field, shall be sold or redeemed; every devoted thing is most holy to the Lord. No one devoted, who is to be devoted for destruction from mankind, shall be ransomed; he shall surely be put to death.

I will send it out, declares the Lord of hosts, and it shall enter the house of the thief, and the house of him who swears falsely by my name. And it shall remain in his house and consume it, both timber and stones.”

“Woe to him who gets evil gain for his house, to set his nest on high, to be safe from the reach of harm! You have devised shame for your house by cutting off many peoples; you have forfeited your life. For the stone will cry out from the wall, and the beam from the woodwork respond.

For any one of the house of Israel, or of the strangers who sojourn in Israel, who separates himself from me, taking his idols into his heart and putting the stumbling block of his iniquity before his face, and yet comes to a prophet to consult me through him, I the Lord will answer him myself.

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. 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. 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.” So about 3,000 men went up there from the people. And they fled before the men of Ai, 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.

And the city and all that is within it shall be devoted to the Lord for destruction. Only Rahab the prostitute and all who are with her in her house shall live, because she hid the messengers whom we sent.But you, keep yourselves from the things devoted to destruction, lest when you have devoted them you take any of the devoted things and make the camp of Israel a thing for destruction and bring trouble upon it. But all silver and gold, and every vessel of bronze and iron, are holy to the Lord; they shall go into the treasury of the Lord.” So the people shouted, and the trumpets were blown. As soon as the people heard the sound of the trumpet, the people shouted a great shout, and the wall fell down flat, so that the people went up into the city, every man straight before him, and they captured the city. Then they devoted all in the city to destruction, both men and women, young and old, oxen, sheep, and donkeys, with the edge of the sword.