Following the defeat of the enemy forces, the focus shifts directly to the fate of the opposing leaders. With their armies completely scattered and broken, the five kings were left entirely vulnerable. Driven by a desperate fear for their own lives, they fled the battlefield [ביאור שטיינזלץ]. In their attempt to escape, they sought total concealment, hiding themselves away from plain sight deep within a cave [מצודת ציון].
This specific choice of refuge was not an accident. Rather than retreating to the safety of their own cities, the kings made a decision directed by God and His providence. They chose to take shelter in a cave located in Makkedah, which was situated right next to the Israelite camp. Because of this close proximity, their secret hiding spot was swiftly discovered and reported to Joshua [מלבי״ם].