So Joshua son of Nun called the priests and said to them, "Take up the ark of the covenant of the LORD and have seven priests carry trumpets in front of it."
And he ordered the people, "Advance! March around the city, with the armed guard going ahead of the ark of the LORD."
When Joshua had spoken to the people, the seven priests carrying the seven trumpets before the LORD went forward, blowing their trumpets, and the ark of the LORD's covenant followed them.
The armed guard marched ahead of the priests who blew the trumpets, and the rear guard followed the ark. All this time the trumpets were sounding.
But Joshua had commanded the people, "Do not give a war cry, do not raise your voices, do not say a word until the day I tell you to shout. Then shout!"
So he had the ark of the LORD carried around the city, circling it once. Then the people returned to camp and spent the night there.
Joshua got up early the next morning and the priests took up the ark of the LORD.
The seven priests carrying the seven trumpets went forward, marching before the ark of the LORD and blowing the trumpets. The armed men went ahead of them and the rear guard followed the ark of the LORD, while the trumpets kept sounding.
So on the second day they marched around the city once and returned to the camp. They did this for six days.
On the seventh day, they got up at daybreak and marched around the city seven times in the same manner, except that on that day they circled the city seven times.
The seventh time around, when the priests sounded the trumpet blast, Joshua commanded the people, "Shout! For the LORD has given you the city!
The city and all that is in it are to be devoted to the LORD. Only Rahab the prostitute and all who are with her in her house shall be spared, because she hid the spies we sent.
But keep away from the devoted things, so that you will not bring about your own destruction by taking any of them. Otherwise you will make the camp of Israel liable to destruction and bring trouble on it.
All the silver and gold and the articles of bronze and iron are sacred to the LORD and must go into his treasury."
When the trumpets sounded, the people shouted, and at the sound of the trumpet, when the people gave a loud shout, the wall collapsed; so every man charged straight in, and they took the city.
They devoted the city to the LORD and destroyed with the sword every living thing in it--men and women, young and old, cattle, sheep and donkeys.
Joshua said to the two men who had spied out the land, "Go into the prostitute's house and bring her out and all who belong to her, in accordance with your oath to her."
So the young men who had done the spying went in and brought out Rahab, her father and mother and brothers and all who belonged to her. They brought out her entire family and put them in a place outside the camp of Israel.
Then they burned the whole city and everything in it, but they put the silver and gold and the articles of bronze and iron into the treasury of the LORD's house.
But Joshua spared Rahab the prostitute, with her family and all who belonged to her, because she hid the men Joshua had sent as spies to Jericho--and she lives among the Israelites to this day.
At that time Joshua pronounced this solemn oath: "Cursed before the LORD is the man who undertakes to rebuild this city, Jericho: "At the cost of his firstborn son will he lay its foundations; at the cost of his youngest will he set up its gates."
So the LORD was with Joshua, and his fame spread throughout the land.
But the Israelites acted unfaithfully in regard to the devoted things; Achan son of Carmi, the son of Zimri, the son of Zerah, of the tribe of Judah, took some of them. So the LORD's anger burned against Israel.
Now Joshua sent men from Jericho to Ai, which is near Beth Aven to the east of Bethel, and told them, "Go up and spy out the region." So the men went up and spied out Ai.
When they returned to Joshua, they said, "Not all the people will have to go up against Ai. Send two or three thousand men to take it and do not weary all the people, for only a few men are there."
So about three thousand men went up; but they were routed by the men of Ai,
who killed about thirty-six of them. They chased the Israelites from the city gate as far as the stone quarries and struck them down on the slopes. At this the hearts of the people melted and became like water.
Then Joshua tore his clothes and fell facedown to the ground before the ark of the LORD, remaining there till evening. The elders of Israel did the same, and sprinkled dust on their heads.
And Joshua said, "Ah, Sovereign LORD, why did you ever bring this people across the Jordan to deliver us into the hands of the Amorites to destroy us? If only we had been content to stay on the other side of the Jordan!
O Lord, what can I say, now that Israel has been routed by its enemies?
The Canaanites and the other people of the country will hear about this and they will surround us and wipe out our name from the earth. What then will you do for your own great name?"
The LORD said to Joshua, "Stand up! What are you doing down on your face?
Israel has sinned; they have violated my covenant, which I commanded them to keep. They have taken some of the devoted things; they have stolen, they have lied, they have put them with their own possessions.