Israel discovers the trick

16 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.

References for Joshua 9:16