Swirling around the solid inner core of our planet, more than 1,800 miles below the surface, hot liquid iron generates a magnetic field that stretches beyond the atmosphere. This field provides us with everything from compass directions to protection from cosmic rays, so it’s no surprise that scientists were alarmed earlier this year when they noticed that the northern magnetic pole was rapidly drifting towards Siberia. While geophysicists scrambled to release an updated model of Earth’s magnetic field ahead of its five-year schedule, the migrating pole posed an urgent question: Is the Earth’s magnetic field preparing to flip?

The magnetic state of our world is constantly changing, with the magnetic north and south poles wandering by a few degrees every century or so. Occasionally the magnetic field experiences a complete polarity reversal, causing the magnetic north and south poles to switch places, although no one knows exactly what causes this turnabout. (In fact, the north pole of the planet is a magnetic south pole right now, but it is still referred to as “magnetic north” to correspond with our geographic measurements.)

In a study published today in Science Advances, researchers report a new estimated timeline of the last polarity reversal, named the Brunhes-Matuyama reversal, which happened around 780,000 years ago. Using a combination of lava samples, ocean sediments and ice cores, they were able to track the progression of this reversal and demonstrate that its pattern was longer and more complex than suggested by previous models. The findings could enable better understanding of how our planet’s magnetic environment evolves and hopefully guide predictions for the next major disturbance.

“[Polarity reversal] is one of the few geophysical phenomena that is truly global,” says Brad Singer, professor of geoscience at the University of Wisconsin–Madison and lead author of the study. “It’s a process that gets started in the deepest parts of the Earth, but it manifests itself in rocks across the entire surface of the planet and effects the atmosphere in pretty important ways. … If we can establish chronology for the timing of reversals, we have markers that we can use to date rocks all over the planet and know common time points around the entire Earth.”

The generation of Earth’s magnetic field starts at its very center. Heat from the solid inner core produced by radioactive decay warms the surrounding liquid iron, causing it to circulate like a pot of water on a stovetop. The fluid motion, or convection, of the iron creates an electric current, which generates a magnetic field. As the Earth spins, the magnetic field roughly aligns with the axis of rotation, creating the magnetic north and south poles.

Over the last 2.6 million years, Earth’s magnetic field flipped 10 times and nearly flipped more than 20 times during events called excursions. Some researchers believe polarity reversals are caused by a disturbance in the balance between Earth’s rotation and the temperature at the core, which alters the fluid motion of the liquid iron, but the exact process remains a mystery.

Singer and colleagues obtained more precise chronological estimates for the last polarity reversal by using new techniques for dating solidified lava. Basaltic lava, which erupts around 1,100 degrees Celsius (2,012 degrees Fahrenheit), contains magnetite, an iron oxide whose outermost electrons orient themselves along the Earth’s magnetic field. When the lava cools down to 550 degrees Celsius (1022 degrees Fahrenheit), “the magnetization direction gets locked, literally baked into the flow,” Singer says. As a result, the magnetic field’s history is stamped into the solidified lava, which Singer and his team could read using a specialized process to measure the argon isotopes of the decayed lava samples.

Unfortunately for geologists (but fortunately for the rest of us), volcanoes don’t erupt all the time, making lava a spotty record-keeper of the magnetic field’s evolution. To sew together the missing dates, the research team combined the new measurements from seven different lava sources around the world with past records of magnetized elements in ocean sediments and Antarctic ice cores. Unlike lava, the ocean provides a continuous record of magnetization, since grains of magnetic material constantly settle on the seafloor and align with the planet’s field. “But these records get smooth and deformed by compaction, and there’s a lot of critters that live at the bottom of the seafloor… so the record gets destroyed a bit,” Singer says.

Antarctic ice offers a third way of resolving the history of Earth’s magnetic field, since it contains samples of a beryllium isotope that forms when cosmic radiation strongly interacts with the upper atmosphere—precisely what happens when the magnetic field weakens during an excursion or reversal.

By combining all three of these sources, the researchers patched together a thorough story for how the magnetic field evolved during its last reversal. While previous studies suggested that all reversals go through three phases in a timespan no longer than 9,000 years, Singer’s team discovered a much more complex reversal process that took over 22,000 years to complete.

“We can see a lot more nuances of the waxing and waning of strengths and directional behavior during this 22,000-year period than ever before,” Singer says. “And it doesn’t match the [three-phase] pattern … so I think they’re going to have to go back to the drawing board.”

The findings call into question whether future field reversals will exhibit similar intricacies and durations. “This is an important paper as it documents new volcanic data, and brings together volcanic and sedimentary records pertaining to instability of the geomagnetic field prior to the last polarity reversal,” says James Channell, a geophysicist from the University of Florida who was not involved in the new research, in an email. “Is this pre-reversal instability a characteristic of all polarity reversals? As yet, there is no evidence of this from older reversals.”

Even with the three sets of measurements, some question remains as to whether the patched-together history provides enough information about how long a reversal takes and exactly what state the field is in when such flips occur. “As long as no complete record shows evidence for the complex succession of events that is depicted by the authors, I am not convinced that the uncertainties on the ages allows us to discern more than two distinct phases,” says Jean-Pierre Valet, a geophysicist from Paris Institute of Earth Physics who was not involved in the research, in an email. Valet also questions the duration of the reversal, arguing that uncertainties in the data suggest the entire process could have ranged from 13,000 years to 40,000 years—still longer than previous estimates.

Learning more about the processes that lead to polarity reversals could be critical for future civilizations, since the shifting magnetic field can have far-reaching effects on the planet.

“When the [magnetic] field is weak, which is during reversals, the main dipole field collapses to something on the order of ten percent of its normal strength,” Singer says. This collapse could spell trouble for life on Earth, since the magnetic field stabilizes ozone molecules, shielding the planet from ultraviolet radiation. Singer points out that recent work suggests modern humans adapted to have protective genes after Neanderthals suffered from radiation during an excursion that deteriorated the magnetic field.

“It’s been discussed for quite a while whether magnetic reversals have an impact on the biota at the surface of the Earth,” he says. “Most of the early claims are kind of preposterous, because the chronology wasn’t good enough to know that the discovery of fossils of Neanderthals, for example, were correlative with an excursion. But now we know those timings much better.”

For the past 200 years or more, Earth’s magnetic field has been decaying at a rate of five percent each century. If this weakening and the recent migration of the northern magnetic pole are indicative of a looming field reversal, it could have serious implications for technologies that rely on satellites, which may be damaged by cosmic radiation. However, Singer cautions that a reversal not likely to happen for the next couple millennia.

“What we’re seeing now with the north pole moving rapidly, that’s actually quite normal,” Singer says. “There are papers published out there based on much poorer records than the ones we’re working with that suggest a reversal could take place in less than a human lifetime, and that’s just not supported by the vast majority of records. … The actual reversal, the final reversal, takes several thousand years.”

That should buy humanity some time to better shield its technologies from radiation by the next reversal. Until then, don’t be alarmed if your compass shifts by a degree or two.