The LORD directed Joshua to set an ambush against Ai Joshua 8:2. Israel drew the men of Ai out by a feigned retreat, then the ambush rose, entered the city, and set it on fire Joshua 8:15–19.
In Joshua 8:1–7, Yahweh tells Joshua not to fear and to restart the campaign against Ai with the full fighting force. Yahweh announces the outcome in advance: Ai’s king, people, city, and land are being handed over. Joshua is to treat Ai like Jericho, except this time Israel may keep the spoil and livestock. This passage follows Israel’s failed first assault on Ai and the crisis that exposed Achan’s wrongdoing in the previous chapter (Joshua 7). With that matter resolved, the narrative turns from mourning and setback to renewed instruction and action.
Joshua 8:1–7 presents a reset after the earlier failure at Ai. The text’s explicit claims are that Yahweh speaks to Joshua, tells him not to fear, commands a renewed advance, and announces the result in advance: Ai’s king, people, city, and land are “given” into Joshua’s hand (verse 1).
A careful answer keeps the immediate passage, the book's argument, and the whole-Bible storyline together, so the question is answered in context instead of as a detached idea.
Start with Joshua 8:2, then read the surrounding section so the answer stays connected to the passage's flow.
2You shall do to Ai and her king as you did to Jericho and her king: only the spoil of it, and the cattle of it, shall you take for a prey to yourselves: set you an ambush for the city behind it.