The lot that fell to the Josephites extended from the Jordan at Jericho to the waters of Jericho east of the wilderness; then the boundary went up from Jericho to the heights at Bethel.
Their northern boundary began at the Jordan and went over the northern flank of Jericho, up westward into the mountains, until it reached the wilderness of Beth-aven.
The king of Ai saw this, and he and all his army came out very early in the morning to engage Israel in battle at the place in front of the Arabah, not knowing that there was an ambush behind the city.
They retreated before the men of Israel in the direction of the wilderness, but the fighting kept pace with them, and those who had been in the city were spreading destruction in between.