The victories of Israel became known to all the kings west of the Jordan---in the hills, in the foothills, and all along the coastal plain of the Mediterranean Sea as far north as Lebanon; these were the kings of the Hittites, the Amorites, the Canaanites, the Perizzites, the Hivites, and the Jebusites.
Then they told him this story: "We have come from a very distant land, sir, because we have heard of the LORD your God. We have heard about everything that he did in Egypt
Our leaders and all the people that live in our land told us to get some food ready for a trip and to go and meet you. We were told to put ourselves at your service and ask you to make a treaty with us.
Joshua made a treaty of friendship with the people of Gibeon and allowed them to live. The leaders of the community of Israel gave their solemn promise to keep the treaty.
So the people of Israel started out and three days later arrived at the cities where these people lived: Gibeon, Chephirah, Beeroth, and Kiriath Jearim.
But the Israelites could not kill them, because their leaders had made a solemn promise to them in the name of the LORD, Israel's God. All the people complained to the leaders about this,
Joshua ordered the people of Gibeon to be brought to him, and he asked them, "Why did you deceive us and tell us that you were from far away, when you live right here?
They answered, "We did it, sir, because we learned that it was really true that the LORD your God had commanded his servant Moses to give you the whole land and to kill the people living in it as you advanced. We did it because we were terrified of you; we were in fear of our lives.
But at the same time he made them slaves, to cut wood and carry water for the people of Israel and for the LORD's altar. To this day they have continued to do this work in the place where the LORD has chosen to be worshiped.