One day in 1905, the French geophysicist Bernard Brunhes brought back to his lab some rocks he’d unearthed from a freshly cut road near the village of Pont Farin. When he analyzed their magnetic properties, he was astonished at what they showed: Millions of years ago, the Earth’s magnetic poles had been on the opposite sides of the planet. North was south and south was north. The discovery spoke of planetary anarchy. Scientists had no way to explain it.

Today, we know that the poles have changed places hundreds of times, most recently 780,000 years ago. (Sometimes, the poles try to reverse positions but then snap back into place, in what is called an excursion. The last time was about 40,000 years ago.) We also know that when they flip next time, the consequences for the electrical and electronic infrastructure that runs modern civilization will be dire. The question is when that will happen.

In the past few decades, geophysicists have tried to answer that question through satellite imagery and math. They have figured out how to peer deep inside the Earth, to the edge of the molten, metallic core where the magnetic field is continually being generated. It turns out that the dipole — the orderly two-pole magnetic field our compasses respond to — is under attack from within.

The latest satellite data, from the European Space Agency’s Swarm trio, which began reporting in 2014, show that a battle is raging at the edge of the core. Like factions planning a coup, swirling clusters of molten iron and nickel are gathering strength and draining energy from the dipole. The north magnetic pole is on the run, a sign of enhanced turbulence and unpredictability. A cabal in the Southern Hemisphere has already gained the upper hand over about a fifth of the Earth’s surface. A revolution is shaping up.

If these magnetic blocs gain enough strength and weaken the dipole even more, they will force the north and south poles to switch places as they strive to regain supremacy. Scientists can’t say for sure that is happening now — the dipole could beat back the interlopers. But they can say that the phenomenon is intensifying and that they can’t rule out the possibility that a reversal is beginning.

It’s time to wake up to the dangers and start preparing.

This animation shows the movement of the north magnetic pole at 10-year intervals from 1970 to 2020. The red and blue lines indicate “declination,” the difference between magnetic north and true north depending on where one is standing; on the green line, a compass would point to true north. Visual: NOAA National Centers for Environmental Information

The Earth’s magnetic field protects our planet from dangerous solar and cosmic rays, like a giant shield. As the poles switch places (or try to), that shield is weakened; scientists estimate that it could waste away to as little as a tenth of its usual force. The shield could be compromised for centuries while the poles move, allowing malevolent radiation closer to the surface of the planet for that whole time. Already, changes within the Earth have weakened the field over the South Atlantic so much that satellites exposed to the resulting radiation have experienced memory failure.

That radiation isn’t hitting the surface yet. But at some point, when the magnetic field has dwindled enough, it could be a different story. Daniel Baker, director of the Laboratory for Atmospheric and Space Physics at the University of Colorado, Boulder, one of the world’s experts on how cosmic radiation affects the Earth, fears that parts of the planet will become uninhabitable during a reversal. The dangers: devastating streams of particles from the sun, galactic cosmic rays, and enhanced ultraviolet B rays from a radiation-damaged ozone layer, to name just a few of the invisible forces that could harm or kill living creatures.

How bad could it be? Scientists have never established a link between previous pole reversals and catastrophes like mass extinctions. But the world of today is not the world of 780,000 years ago, when the poles last reversed, or even 40,000 years ago, when they tried to. Today, there are nearly 7.6 billion people on Earth, twice as many as in 1970. We have drastically changed the chemistry of the atmosphere and the ocean with our activities, impairing the life support system of the planet. Humans have built huge cities, industries and networks of roads, slicing up access to safer living spaces for many other creatures. We have pushed perhaps a third of all known species toward extinction and have imperiled the habitats of many more. Add cosmic and ultraviolet radiation to this mix, and the consequences for life on Earth could be ruinous.

And the perils are not just biological. The vast cyber-electric cocoon that has become the central processing system of modern civilization is in grave danger. Solar energetic particles can rip through the sensitive miniature electronics of the growing number of satellites circling the Earth, badly damaging them. The satellite timing systems that govern electric grids would be likely to fail. The grid’s transformers could be torched en masse. Because grids are so tightly coupled with each other, failure would race across the globe, causing a domino run of blackouts that could last for decades.

In this animation, the blue lines indicate a weaker magnetic field, the red lines a stronger one, and the green line the boundary between them, at 10-year intervals from 1910 to 2020. The field is weakening over South America, and the red area over North America is losing strength. Visual: NOAA National Centers for Environmental Information

No lights. No computers. No cellphones. Even flushing a toilet or filling a car’s gas tank would be impossible. And that’s just for starters.

But these dangers are rarely considered by those whose job it is to protect the electronic pulse of civilization. More satellites are being put into orbit with more highly miniaturized (and therefore more vulnerable) electronics. The electrical grid becomes more interconnected every day, despite the greater risks from solar storms.

One of the best ways of protecting satellites and grids from space weather is to predict precisely where the most damaging force will hit. Operators could temporarily shut down a satellite or disconnect part of the grid. But progress on learning how to track damaging space weather has not kept pace with the exponential increase in technologies that could be damaged by it. And private satellite operators aren’t collating and sharing information about how their electronics are withstanding space radiation, a practice that could help everyone protect their gear.

We have blithely built our civilization’s critical infrastructure during a time when the planet’s magnetic field was relatively strong, not accounting for the field’s bent for anarchy. Not only is the field turbulent and ungovernable, but, at this point, it is unpredictable. It will have its way with us, no matter what we do. Our task is to figure out how to make it hurt as little as possible.

Alanna Mitchell is an award-winning science journalist and author. She is also a playwright who performs her one-woman play, “Sea Sick,” based on her book of the same name, around the world.