Joshua 9:15

And Joshua made peace with them, and made a league with them, to let them live: and the princes of the congregation sware unto them.

Joshua made peace with the Gibeonites and made a league with them to let them live, and the princes of the congregation sware unto the agreement. That agreement was made at Gilgal. Israel's leaders accepted the strangers' claim that they had come from a distant, very far country. They entered the treaty without asking counsel of the Lord, without seeking counsel from God. Only three days later Israel learned that the Gibeonites were their neighbors close at hand and had used deception to preserve their own lives.

The failure to seek divine counsel made the treaty unwise. That neglect brought punishment upon Israel, with lasting consequences for the failure. The Gibeonites renounced their heathenism and united with Israel, joining themselves to Israel. By joining Israel they shared in the blessings of God's covenant. Their renunciation of heathenism and recognition of Israel's God brought them within the reach of His mercy.