The Israelites had been deceived by the Gibeonites and the local Canaanite kings were pretty upset about it. The Gibeonites had made an alliance with the foreigners, who had just invaded Jericho and Ai, their fellow city-states. Facing a common threat, the local kings formed their own alliance. It was initiated by the king of Jerusalem, Adoni-zedek (whose name means “my lord is righteousness”, cf. Melchizedek, former King of [Jeru]Salem, whose name means “my king is righteousness”), who called up his four allies: “Come up to me and help me, and let us strike Gibeon.” (10.4)
The Gibeonites then asked the Israelites to save them and the Israelites obliged. It was not an enviable task, since they had to fight against five kings. “Do not fear them”, thus said YHWH to Joshua. They fought, and they won. The Canaanites ran away and YHWH threw down large stones on them. The author commented, “there were more who died because of the hailstones than the sons of Israel killed with the sword.” (10.11) It is, of course, to underline that YHWH is greater than Israel and in the end it was he who fought for them.
Indeed, the theological claim was substantiated by a tale of the sun who stood still at the battlefield for about a whole day (10.12-13). Again, the author commented that “there has been no day like it before or since, when YHWH heeded the voice of man, for YHWH fought for Israel.” (10.14) There has been no day like if before or since; the day is unique. That’s the theological significance of the day when the Israelites defeated the five kings. And the victory could only be described fittingly in hyperbolic language: the sun stood still for a whole day.