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.
Thence he removed to the mountain on the east of Bethel, and pitched his tent, with Bethel on the west and Ai on the east; and there he built an altar to the Lord and called on the name of the Lord.
“Wail, O Heshbon, for Ai is laid waste! Cry, O daughters of Rabbah! Gird yourselves with sackcloth, lament, and run to and fro among the hedges! For Milcom shall go into exile, with his priests and his princes.
On the north side their boundary began at the Jordan; then the boundary goes up to the shoulder north of Jericho, then up through the hill country westward; and it ends at the wilderness of Beth-aven.
And Joshua the son of Nun sent two men secretly from Shittim as spies, saying, “Go, view the land, especially Jericho.” And they went, and came into the house of a harlot whose name was Rahab, and lodged there.
And they returned to Joshua, and said to him, “Let not 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 but few.”
And the Philistines mustered to fight with Israel, thirty thousand chariots, and six thousand horsemen, and troops like the sand on the seashore in multitude; they came up and encamped in Michmash, to the east of Beth-aven.