In chapter 9, Joshua is approached by a group of Gibeonites looking to forge a treaty by deception. While the other kings of Canaan were amassing troops, the Gibeonites sent envoys from their land posing as travelers from a far distance, with crusty bread, old wineskins and clothes, and patched sandals. They convinced Joshua they were from a distant land, and made a covenant of peace with Joshua. Later, Joshua found out that they were Canaanite dwellers, and decided to conscript them into service as woodcutters and water carriers, for they could not kill them due to the covenant.
In chapter 10, Adoni-Zedek, king of Jerusalem, allied with the kings of Hebron, Jarmuth, Lachish, and Eglon to fight against Gibeon, because they had allied with Israel. Gibeon sent for Joshua, and he brought the army to Gibeon. They waged war against the kings, having been assured by the Lord. God sent hailstones against the armies, and when Joshua asked for the sun to stand still, it did not rise or fall for about a whole day. And Joshua’s forces won the war.
Two things are important to remember from these stories. First, be very cautious when making alliances with anyone or any group. Be careful to hear God’s voice and obey His commands regarding any relationship. Your future, your blessings depend upon it. Second, trust God during conflict. Even when the odds may not seem to be in your favor, God will fight on your behalf. He will defend His own!