Three days after the Israelites made a treaty with the Gibeonites, the Israelites heard that they were actually their neighbors and were living among them.
So on the third day the Israelites marched out and came to their cities: Gibeon, Chephirah, Beeroth, and Kiriath-jearim.
But the Israelites didn't strike at them. This was because the leaders of the community had made a solemn pledge to them by the LORD, the God of Israel. The entire community grumbled against the leaders.
Then all the leaders said to the whole community, "We have made a solemn pledge to them by the LORD, the God of Israel. So we can't touch them now.
This is what we'll do with them. We'll let them live so that wrath won't come down on us because of the solemn pledge that we made to them."
The leaders went on to say to them, "Let them live." So they became woodcutters and water haulers for the whole community, exactly as the leaders had intended for them.
Joshua called for the Gibeonites and spoke to them: "Why have you deceived us by saying, ‘We live very far away from you,' when actually you live among us?
So now you are cursed. Some of you will always serve as woodcutters and water haulers for my God's house."
They answered Joshua, "Your servants had been told that the LORD your God had commanded his servant Moses to give you the entire land and to wipe out all its population on your account. So we feared for our very lives because of you and did this thing.
Now, here we are in your power. Do to us whatever seems good and proper to you."
So Joshua treated them in this way. He spared them from the power of the Israelites, and they didn't kill them.
That day Joshua assigned them as woodcutters and water haulers for the community and for the LORD's altar, located wherever God would choose. That is still the case today.