With the sin of Achan cleansed from Israel’s camp (Josh. 7:10–26), the second assault against Ai was successful, and Joshua and the people took the city and devoted its citizens to destruction, keeping the livestock and spoil of the city for themselves (8:1–29). To prove they had learned their lesson, Joshua then led the Israelites in renewing the covenant with God (8:30–35). Following this, Israel was tricked into making peace with the Gibeonites, which spared that group from destruction even as the Gibeonites also became servants to the children of the Lord (chap. 9).
Gibeon was an important city in the days of Joshua, but even its rulers knew from the destruction of Ai and Jericho that they were no match for Yahweh, the Lord of Hosts (9:22–27). Yet since the other kings of Canaan beyond the Jordan had formed an alliance against the Israelites (v. 1), they feared the loss of Gibeon’s might and took steps to regain it (10:1–4). So the kings of Jerusalem, Hebron, Jarmuth, Lachish, and Eglon went up against Gibeon to regain the city for the Canaanite inhabitants (v. 5).
What followed was a great battle between the forces of Joshua and the Canaanites, a battle in which the Lord intervened on behalf of Israel (vv. 6–15). Having defeated their enemies, Joshua and the Israelites then put their feet on the necks of the defeated kings as a symbol of their utter subjugation and defeat before putting them to death (vv. 16–28).
The events of this chapter and the rage of the Canaanites against God and His people call to mind Psalm 2 and its description of the kings of the earth warring against the anointed Davidic ruler (vv. 1–3). That anyone would think he could successfully fight the Almighty is foolish indeed, so the Lord laughs each time the arrogance of mankind displays itself in that manner (v. 4). God has pledged to give the nations to the son of David as his heritage and the ends of the earth as his possession (vv. 5–8).
This psalm is fulfilled ultimately in the son of David who is also the only begotten Son of God. Like Joshua, He will put His feet on the necks of His enemies who will all submit to Him whether they want to or not (vv. 9–12). Some will honor the Son willingly and find refuge in Him, others will be forced into submission with His rod of iron (v. 9), but all people will bow to the King of kings and Lord of lords (Phil. 2:10).