Now Joshua sent men from Jericho to Ai, which is near Beth-aven, east of Bethel, and spoke to them saying: “Go up and spy out the land.” So the men went up and spied out Ai.
From there he moved to the mountain to the east of Beth-El and erected his tent (with Beth-El to the west and Ai to the east). There he built an altar to Adonai and called on the Name of Adonai.
“Wail, Heshbon, for Ai is devastated! Cry, daughters of Rabbah! Wear sackcloth, lament, and run to and fro within the walls, for Malcam will go into captivity together with his priests and princes.
Though you, Israel, are a prostitute, let Judah not become guilty. But do not come to Gilgal or go up to Beth-aven, and do not swear: ‘As Adonai lives!’
Now their border on the north side was from the Jordan—the border went up to the side of Jericho on the north, and went up through the hill country westward, and it ended at the wilderness of Beth-aven.
Then Joshua son of Nun secretly sent out two spies from Shittim saying: “Go, explore the land, especially Jericho.” So they went and came to the house of a prostitute whose name was Rahab, and lodged there.
When they returned to Joshua, they reported to him: “Let not all the people go up—only about two or three thousand men need go up and strike Ai, so don’t wear out all the people there, for they are just a few.”
Meanwhile the Philistines assembled themselves to fight with Israel: 30,000 chariots, 6,000 horsemen and troops as numerous as the sand on the seashore. They marched up and camped in Michmas, east of Beth-aven.