On May 28, 585 BCE, a solar eclipse ended a six-year war.
The Greek philosopher Thales lived in the seaside town of Miletus. He hypothesized that water was the source of all matter, and according to several accounts, he predicted the solar eclipse of May 28, 585 BCE. It's unclear whether he really called it—or how he understood eclipses to work, especially given that he thought the Earth was a flat disk floating in water. But according to writings by Herodotus and the philosopher Xenophanes, Thales predicted a total solar eclipse.
In 585 BCE, King Alyattes of Lydia was at war with King Cyaxares of Media. They had been fighting for six years with neither side making significant progress. Their war was particularly bitter because a group of hunters working for the Medes had killed one of Cyaxares's sons and served him up as a meal (yikes). This fight was personal.
On May 28, during a battle along the Halys River, the eclipse arrived. Herodotus wrote an account of this battle in The Histories, reporting that Thales had predicted the eclipse:
...[A]nd as they still carried on the war with equally balanced fortune, in the sixth year a battle took place in which it happened, when the fight had begun, that suddenly the day became night. And this change of the day Thales the Milesian had foretold to the Ionians laying down as a limit this very year in which the change took place. The Lydians however and the Medes, when they saw that it had become night instead of day, ceased from their fighting and were much more eager both of them that peace should be made between them.
The warring armies saw the eclipse as an omen indicating that they should stop fighting. They dropped their weapons, called a truce, and ultimately sealed the peace with a royal wedding between Alyattes's daughter and a living son of Cyaxares.
Writer Isaac Asimov believed that the eclipse of Thales was the first scientific experiment. Assuming we believe Herodotus, Thales hypothesized that an eclipse would occur on a given date and tested that hypothesis by observation. Whether it happened that way, we will likely never know—but it makes for a great story.
Because modern astronomers can pinpoint the date and location of that solar eclipse, the Battle of Halys is one of the oldest historical events with a precise date attached. Whether Thales predicted the eclipse or not, it did occur—and it stopped a war.