And Joshua sent men from Jericho to Ai, which is beside Bethaven, on the east side of Bethel, and spoke unto them, saying, Go up and view the country. And the men went up and viewed Ai.
And he removed from there unto a mountain on the east of Bethel, and pitched his tent, having Bethel on the west, and Ai on the east: and there he built an altar unto the LORD, and called upon the name of the LORD.
Wail, O Heshbon, for Ai is plundered: cry, you daughters of Rabbah, gird yourselves with sackcloth; lament, and run to and fro inside the walls; for their king shall go into captivity, and his priests and his princes together.
And their border on the north side was from the Jordan; and the border went up to the side of Jericho on the north side, and went up through the mountains westward; and it ended at the wilderness of Bethaven.
And Joshua the son of Nun sent out of Shittim two men to spy secretly, saying, Go view the land, even Jericho. And they went, and came into a harlot's house, named Rahab, and lodged there.
And they returned to Joshua, and said unto him, Let not all the people go up; but let about two or three thousand men go up and attack Ai; and make not all the people to toil up there; for they are but few.
And the Philistines gathered themselves together to fight with Israel, thirty thousand chariots, and six thousand horsemen, and people as the sand which is on the sea shore in multitude: and they came up, and encamped in Michmash, eastward from Bethaven.