The Gibeonites answered, “Your servants were told clearly that the LORD your God had commanded His servant Moses to give you all the land and wipe out all its inhabitants before you. So we greatly feared for our lives because of you, and that is why we have done this.
The matter is here settled between Joshua and the Gibeonites, and an explanation of the league agreed upon. We may suppose that now, not the messengers who were first sent, but the elders of Gibeon, and of the cities that were dependent upon it, were themselves present and treated with, that the matter might be fully compromised. I. Joshua reproves them for their fraud, Jos 9:22.
Commenting on Joshua 9:22-27
And they answered Joshua, and said, because it was certainly told thy servants,.... Or "it was told", told (t); not only certainly, told, but frequently told them, they had often heard of it by one means or another: how that the Lord thy God commanded his servant Moses to give you all the land; all the land of Canaan, no part excepted; they had heard...
We were sore afraid of our lives - Self-preservation, which is the most powerful law of nature, dictated to them those measures which they adopted; and they plead this as the motive of their conduct.