In a famous episode in the book of Joshua, the title figure declares: “Stand still, O sun, at Gibeon, O moon in the Valley of Aijellon!”; in response, the text tells us, “the sun stood still and the moon halted.” These verses are usually taken to mean that God slowed the progress of the sun across the heavens to give the Israelites more time for their battle against the Amorites. The passage would be cited by, on the one hand, religious critics of Copernicus and Galileo as proof the sun revolves around the earth and by, on the other hand, rationalist critics of the Bible as proof of Scripture’s fallibility. Mark Chavalas argues that it means something else entirely (free registration required):
The phraseology in Joshua 10:12-13 sounds suspiciously like the vocabulary used in Mesopotamian celestial-omen texts. In fact, it is clear that the relative position of the sun and moon played a role in determining military movements [in ancient Mesopotamia]. Kings consulted omen priests who told them whether a particular solar/lunar juxtaposition was propitious for victory. . . .
Many of the technical phrases in these omens concern the “stopping” and “waiting” of the heavenly bodies. From the standpoint of the viewer on earth, [according to the astrologers], the sun and moon “stopped and waited” for each other (that is, they were seen together: a bad omen for the fifteenth day after a full moon). . . . [Such] celestial-omen observation was not just prevalent in Mesopotamia but [also] in northwest Syria at the sites of Ugarit, Mari, and Emar (all in regions with significant Amorite connections). . . .
[T]his context also helps answer an easily anticipated question: why would a follower of the God of Israel ask for an omen, a practice that was considered divination and regarded [by the Pentateuch] as a capital crime? The answer is that . . . Joshua was not asking for a celestial phenomenon for himself, or even for Israel, but probably for the enemy; he must have known what it meant for them to have the sun and moon aligned on the fifteenth day [after the full moon], presumably the day of battle. If they received a bad omen, it would have significantly lowered their [morale].