Joshua 10:26

And afterward Joshua smote them, and slew them, and hanged them on five trees: and they were hanging upon the trees until the evening.

The hanging of the five kings until the evening belongs to the history of Israel's dealings with the Gibeonites. That dealing began when the Gibeonites practiced deception upon Joshua and the leaders of Israel. By that deception they drew Joshua and Israel's leadership into making a treaty with them. The striking, slaying, and hanging of the kings is thus set within the unfolding account of that league and its consequences.