A Babylonian clay tablet gives the oldest intact record of a solar eclipse, on March 5, 1223 BCE. “The sun went down, its gatekeeper was Mars,” the tablet says.

Wikipedia / Via upload.wikimedia.org The Nebra sky disk, Germany, 1600 BCE.

On Oct. 22 in 2134 BCE, a total solar eclipse occurred over China, with the Emperor Chung K’ang’s records noting that “the Sun and Moon did not meet harmoniously.”

Two court astronomers, named Hsi and Ho, were quickly beheaded for not predicting the event. In the 4,000 years since, astronomers have gotten much better at predicting eclipses. “It has been centuries of gradual improvement that just piled up over time,” former NASA astronomer Fred Espenak told BuzzFeed News. Only in the 1700s did reliable ground maps of eclipses appear, and their calculation was quite laborious until the 1970s. “The floodgates really opened when digital computers came online,” he said. Ancient Chinese astronomers feared a celestial dragon had eaten the sun during an eclipse. The Babylonians worried that the moon god had been surrounded by seven demons. And those were the top guys when it came to recording eclipses. The oldest intact record of a solar eclipse comes from a clay tablet from the Babylonian city of Ugarit that records a total solar eclipse on March 5, 1223 BCE. “The sun went down, its gatekeeper was Mars,” alarmed astronomers noted on the tablet. “Two livers were examined: danger.” Back then, diviners would look to the innards of animals sacrificed to the gods as signs from heaven, so this message was a sign of bad news to come for the king.

NASA / Via eclipse2017.nasa.gov A Babylonian solar eclipse tablet listing eclipses between 518 and 465 BCE.

The earliest Babylonian records of lunar eclipse predictions come from 745 BCE, classical scholar John Steele of Brown University told BuzzFeed News. It was about the same time the neo-Assyrian empire (today’s northern Iraq) began to take over the Middle East, aided by very large, well-organized armies equipped with a hot new invention: iron weapons. The neo-Assyrians believed the sky was a solid dome on which the stars traveled, which was in turn covered by a celestial ocean. By 600 BCE, predicting lunar eclipses was a regular occurrence, Steele said. Warning letters regularly went from astronomers to Assyrian and Babylonian rulers about possible upcoming eclipses. A survey of 61 solar eclipse predictions from 357 BCE to the year 6 found they were 100% accurate in predicting, to within eight hours, the time of an eclipse happening somewhere on Earth. But only 28 of them were visible from Babylon. How did they do it? Basically, by keeping records of past eclipses over the centuries, the astronomers detected an eclipse cycle and formalized its rules. The key to the astronomers’ partial success was the so-called Saros cycle — a period of 18 years, 11 days, and 8 hours — which saw lunar and solar eclipses repeat on five- and six-month intervals. By the Middle Ages, astronomers had compiled long tables of lunar, solar, and planetary crossings — called “ephemerides” — which were used to predict eclipses. Most of them relied on methods owed to the Greek astronomer Ptolemy, dating to around the year 150.

Wikipedia / Via upload.wikimedia.org Ancient astronomical tables.

For eclipses, the tables grew slowly less useful because, unknown to astronomers, the length of the day slowly increases over the centuries, throwing off predictions. This increase is caused by the gravitational pull of the moon, which robs rotational energy from the Earth as it creates the tides, adding about 40 seconds per century to the length of the day. The exact, changing distance from the Earth to the moon wasn’t measured until astronauts left mirror reflectors on the moon during the Apollo landings.

Isaac Newton’s 1687 theory of gravity — and the calculation of eclipses made from it in the next few decades by famous comet discoverer Edmond Halley — started the modern age of eclipse path predictions. Halley published the first public “broadsheet” depiction of an eclipse’s path, tracking a solar eclipse across England in 1715. He was about 20 miles off on its path but, according to the historian Alice Waters of the University of Massachusetts, Lowell, he saved “the Publick” and King George I from fears that the eclipse was a bad omen, a real fear after a year of civil unrest in England. The most eagerly awaited eclipse prediction of the next few centuries came in 1919, around the total solar eclipse falling on the island of Príncipe. There, the English astronomer Arthur Eddington waited to measure just how much the sun’s gravity bent the light from distant stars passing close to the sun, normally impossible to see in the glare of sunlight, during six minutes of total eclipse. Albert Einstein’s new theory of gravity predicted that light from the constellation Taurus would bend nearly twice as much as Newton’s theory said it would as it passed by the sun. To some controversy, Eddington found the light bent just that much, a confirmation that set Einstein on his path to worldwide acclaim. Astronomers have since repeated the experiment, confirming the theory of gravity every time — and they’ll be doing it again this August, in Wyoming and Oregon. With computers doing the calculations since the 1970s, a lot of the number-crunching work of predicting eclipse paths has gone away, said Espenak, who for decades ran NASA’s eclipse website. Even now, though, long-term predictions of exactly where eclipses will fall are a bit dicey because of the moon’s recession from Earth, he said. The moon is tipped 5 degrees from Earth’s equator and it feels a tug from both the Earth and sun, as well as a tiny pull from Jupiter. “They pull it up and down — that causes all kinds of problems,” Espenak said, affecting the placement of the eclipse map. “The moon is devilishly difficult to predict.” Climate change, which is raising sea levels and melting ice packs, might in turn affect tides, and also throw lunar eclipse predictions out of whack. “We can’t be certain how that will go in the coming centuries,” he added. “But we are certainly a lot better at predicting than they were all those centuries ago.”