Joshua sent men from Jericho to Ai (which is near Beth-aven, east of Bethel) and said to them, “Go up and spy on the land.” So the men went up and spied on Ai.
From there he continued on to a mountain to the east of Bethel and pitched his tent, having Bethel on the west and Ai on the east. There he built an altar to the Lord and called on the name of the Lord.
Howl, O Heshbon, for Ai has been devastated! Cry out, O daughters of Rabbah, gird yourselves with sackcloth and lament, and run to and fro inside the walls; for their king shall go into captivity, and his priests and his officials together.
Their northern border goes from the Jordan up the northern slope of Jericho. It runs westward into the hill country and extends to the wilderness of Beth-aven.
Then Joshua son of Nun sent two men out from Shittim to spy, saying, “Go see the land, especially Jericho.” So they went, and they came to the house of a prostitute named Rahab. They spent the night there.
Then they returned to Joshua and said to him, “All the people need not go up. Let about two or three thousand men go up and strike Ai. Since they are so few, all the people need not weary themselves.”
The Philistines gathered together to fight with Israel, thirty thousand chariots and six thousand horsemen, with people like the sand which is on the seashore in multitude. And they came up and camped in Mikmash, east of Beth-aven.