While Israel was still camped near Jericho, Joshua sent some spies with these instructions: “Go to the town of Ai and find out whatever you can about the region around the town.” The spies left and went to Ai, which is east of Bethel and near Beth-Aven.
Then he chose three thousand men from Israel to be full-time soldiers and sent everyone else home. Two thousand of these troops stayed with him in the hills around Michmash and Bethel. The other thousand were stationed with Jonathan at Gibeah in the territory of Benjamin.
The Philistines called their army together to fight Israel. They had three thousand chariots, six thousand cavalry, and as many foot soldiers as there are grains of sand on the beach. They went to Michmash and set up camp there east of Beth-Aven.