You will find this story in the book of Joshua 10:1-27, 11:1-11…….(in the Old Testament part of the Bible)…..
News of the way Joshua and the men of Israel had conquered the cities of both Jericho and Ai had spread far and wide in the region that Israel was now entering.
The men of Gibeon got together and said to each other, “Have you heard what Joshua has done to Jericho and Ai? We’ll have to do something to make peace with him before he attacks us!”
“Yes,” said one, “Let’s pretend we’ve come from a far country with old worn out clothes and shoes and mouldy bread to make it look as though we’ve been on a very long journey, and ask him if he’ll make a treaty with us”.
“What a good idea!” they all agreed.
So a group of them got together, and dressed in old shabby clothes with worn out shoes, and carried their bag of mouldy bread over their shoulders and went to meet Joshua. When they found him, they told their story and produced the evidence….”Look Joshua, here’s our mouldy bread and worn out shoes. This shows how far we’ve come! Make a treaty with us,” they said. This is where Joshua slipped up. He should have said, “I’ll ask God first”, but he didn’t. He looked at the supposed evidence and believed what they said. “Sure”, he said, “We can do that!” So he agreed to make a treaty with them which guaranteed them to be protected by Israel, no matter what. They went away smiling and pleased with themselves.
Three days later the news leaked out, and the men of Israel found out that these people who had supposedly come from far away, actually lived right among them! The people of Israel heard what these people had done, and they started whispering among themselves against the princes and leaders who had made this treaty. They heard these death threats that the people were making. “We can’t do anything to them,” they said, “We’ve made a solemn treaty with them.” Joshua called for the Gibeonites to come to him. “You frauds!” he said, “You lied to us! You just live nearby! From now on, you will be our servants and do all our heavy work for us!” The other Israelis said, “Let’s teach them a lesson, the lying sods!” “No, we can’t do that,” Joshua said, “We’ve made them a solemn promise and we have to keep to it!” The Gibeonites didn’t mind, and said to each other, “At least we’ll be protected if we become their servants!”
In chapter ten, we see that is exactly what happened. The people of Gibeon started to prosper and do really well. Their animals all grew fat and big, and their gardens bore large crops. The other tribes round about them began to mutter….”Let’s get together and go and teach Gibeon a lesson! That will teach them to make peace with Israel our enemy!” The men of Gibeon heard these threats, and quickly sent a message to Joshua, saying, “Come and help us from these other kings. We’re your servants, remember!” This time Joshua remembered to ask God what to do. “Go and chase them out,” God said, “Don’t be afraid, because I’m going to fight for you!” So Joshua and his men travelled all night and came upon the enemy first thing in the morning. They didn’t know what had struck them when Joshua and his men started to chase them. They ran, and as they ran the sky got darker and darker, and God sent enormous hailstones on them. More people died with the hailstones than died in the actual battle!
This was the beginning of a great victory for Israel, and they took all the cities of the land one by one because the Lord fought for them (Joshua 10:42)