The Greek philosopher Thales of Miletus accurately predicted a solar eclipse, according to The Histories of Herodotus. If Herodotus's account is accurate, this eclipse is the earliest recorded as being known in advance of its occurrence. Many historians believe that the predicted eclipse was the solar eclipse of May 28, 585 BC. How exactly Thales predicted the eclipse remains uncertain; some historians claim the eclipse was never predicted at all. Others have argued for different dates.
According to Herodotus, the appearance of the eclipse was interpreted as an omen, and interrupted a battle in a long-standing war between the Medes and the Lydians. The fighting immediately stopped, and they agreed to a truce. Because astronomers can calculate the dates of historical eclipses, Isaac Asimov described this battle as the earliest historical event whose date is known with precision to the day.
Herodotus' The Histories 1.73-74 states that a war started in the period between the Medes and the Lydians. There were two reasons for the war; the two sides' clashing interests in Anatolia, but also there was a motive of revenge. Some Scythian hunters employed by the Medes who once returned empty-handed were insulted by King Cyaxares. In revenge the hunters slaughtered one of his sons and served him to the Medes. The hunters then fled to Sardis, the capital of the Lydians. When Cyaxares asked for the Scythians to be returned to him, Alyattes II refused to hand them over; in response, the Medes invaded.
Afterwards, on the refusal of Alyattes to give up his suppliants when Cyaxares sent to demand them of him, war broke out between the Lydians and the Medes, and continued for five years, with various success. In the course of it the Medes gained many victories over the Lydians, and the Lydians also gained many victories over the Medes. Among their other battles there was one night engagement. As, however, the balance had not inclined in favour of either nation, another combat took place in the sixth year, in the course of which, just as the battle was growing warm, day was on a sudden changed into night. This event had been foretold by Thales, the Milesian, who forewarned the Ionians of it, fixing for it the very year in which it actually took place. The Medes and Lydians, when they observed the change, ceased fighting, and were alike anxious to have terms of peace agreed on.