It’s often said that the heavens run like clockwork. Astronomers can easily predict eclipses, and they can foretell to a fraction of a second when the moon passes in front of a distant star. They can also rewind the clock, and find out when and where these events happened in the past. But a new historical survey of hundreds of eclipses, some dating back to the 8th century B.C.E., finds that they aren’t as predictable as scientists thought. That’s because Earth’s spin is slowing down slightly. Not only that, the study also identifies short-term hiccups in the spin rate that have been missed by cruder models.

“There have been about a million days since 720 B.C.,” says Leslie Morrison, an astronomer now retired from the Royal Observatory Greenwich in London. Over such a long time, even a gradual slowdown in Earth’s rotation becomes evident, he notes.

To conduct the research, Morrison and his colleagues analyzed the timing and location of eclipses from ancient Greece, China, the Middle East, and other areas worldwide. The oldest event in the catalog, a total solar eclipse that occurred in 720 B.C.E., was observed by astronomers at a site in Babylon (now modern-day Iraq). But, working backward, today’s astronomers would have predicted that the eclipse should have been seen a quarter of a world away, somewhere in the western Atlantic Ocean. The discrepancy means Earth’s rotation has gradually slowed since the 8th century B.C.E.

Overall, Earth’s spin has slowed by about 6 hours in the past 2740 years, the team reports today in the Proceedings of the Royal Society A . That sounds like a lot, but it works out to the duration of a 24-hour day being lengthened by about 1.78 milliseconds over the course of a century.

The interaction between ocean tides and Earth’s continents is the biggest factor in slowing Earth down, Morrison explains. As those landmasses get slammed by the seas, Earth loses some rotational momentum. But models considering only this phenomenon suggest that Earth’s rotation should be slowing down more than observed, by about 2.3 milliseconds per day every century.

So other factors must be at work, the researchers say. One major influence is the slow rebound of crust that was weighed down by massive ice sheets during the last ice age that have since melted away. Whereas the crust is springing upward at high latitudes, at lower latitudes the planet is shrinking inward. Like an ice skater bringing her arms inward to spin faster, that overall shift of mass is speeding up Earth’s rotation, Morrison says.

Superimposed on that long-term trend, though, are small decade-to-decade variations in spin rate. These glitches are apparent from astronomical observations of occultations of stars by the moon—miniature eclipses that occur when the moon passes in front of the distant star. The variations stem from momentum shifts between Earth’s liquid outer core and the solid mantle that overlies it, Morrison explains.

Mathieu Dumberry, a planetary scientist at the University of Alberta in Edmonton, Canada, who was not involved in the new study, says these momentum exchanges are poorly understood. Nevertheless, he notes, the team’s findings are “a wonderful new piece of evidence that helps us measure the magnitude and direction of such interactions deep within the Earth.”

The new data should help scientists better model the movement of liquid iron in the outer core, which gives rise to Earth’s magnetic field, says Duncan Agnew, a geophysicist at Scripps Institution of Oceanography in San Diego, California.

Although these small time shifts are important for scientists to consider over geologic timescales, eclipse predictions are still pretty good in the short term. The next total eclipse of the sun will darken a narrow path stretching across the United States next 21 August, give or take a millisecond.