While you didn’t see it, feel it, or even read about it in the newspapers, Earth was almost knocked back to the Stone Age on July 23, 2012. It wasn’t some crazed dictator with his finger on the thermonuclear button or a giant asteroid that came close to wiping out civilization as we know it, though — no, what nearly ended us was a massive solar storm. Almost two years ago to the day, our most bounteous and fantastical celestial body — the Sun — kicked out one of the largest solar flares and coronal mass ejections ever recorded. And it missed Earth by a whisker. “If it had hit, we would still be picking up the pieces,” says Daniel Baker, who led the research into the massive solar storm.

A solar storm is a generic term for increased activity in the Sun. In this case, the solar storm of July 2012 consisted of a massive solar flare, followed by a colossal coronal mass ejection (CME). A solar flare is initiated by the sudden release of energy stored in the Sun’s corona, causing the Sun’s plasma to heat up to tens of millions of degrees, accelerating and kicking out all sorts of radiation, and often creating a solar prominence or filament (eruption). In a large solar storm, the same energy from the corona can also cause a coronal mass ejection — a much slower-moving billion-ton cloud of plasma (electrons and protons).

Suffice it to say, but it’s bad news if the energy and plasma from a big solar flare or CME hits the Earth. Much like a man-made electromagnetic pulse (EMP) weapon, the solar energetic particles strike the Earth with such force that it ionizes the atmosphere, creating a vast cloud of energetic electrons that bounce around inside the atmosphere destroying electronics and fusing conductive wires everywhere. It would probably take out a few satellites in Earth orbit, too.

Prior to the July 2012 storm, the largest recorded storm was the Carrington Event of 1859. A massive solar flare and CME struck Earth, destroying much of the Victorian telegraph network in Europe and North America. Other solar storms have hit Earth since then, but fortunately we’ve only been hit by one large storm during modern times, which caused the 1989 Quebec blackout. The July 2012 storm was roughly twice as large as the event that caused the Quebec blackout — but fortunately, thanks to the sheer expanse of space and the Earth’s relatively large orbital distance, we dodged the bullet. “In my view the July 2012 storm was in all respects at least as strong as the 1859 Carrington event,” says Daniel Baker of the University of Colorado. “The only difference is, it missed.” [Read: Finally confirmed: An asteroid wiped out the dinosaurs.]

Rather luckily for science, though, the July 2012 solar flare and CME did hit NASA’s STEREO A satellite square on the nose. STEREO A and B are solar observation satellites that have been orbiting the Sun since 2006, providing us with all sorts of delicious imagery and science. The video above uses footage captured by the two STEREO satellites. The image at the top of the story, of a solar flare with the Earth photoshopped in for scale, was captured by NASA’s newer Solar Dynamics Observatory. Using data from these satellites, and from historical solar storms,

If the solar storm had hit Earth back in 2012, the total economic impact is estimated to be around $2 trillion, or 20 times the cost of Hurricane Katrina. It’s not just about money, though: As I covered in our feature story The Machine Stops, it would take time to fix up the world’s power grid. You can’t just magically replace dozens of giant transformers and substations. There are only so many diesel generators to fill the gap. If a giant solar storm hit the Earth, large parts of society could be without power for months or years.

Pete Riley, a physicist who looked at extreme space weather events for the last 50 years, says there’s a 12% chance that a Carrington-level storm will hit Earth in the next 10 years.

It isn’t all bad though: When we inevitably get hit by a large solar event, the resultant geomagnetic storm that wipes out most of Earth’s electronic systems will also generate some beautiful Aurorae. The Carrington Event was so powerful that the Northern Lights (aurora borealis) were seen as far south as Cuba, and the Southern Lights (aurora australis) were seen in Queensland, Australia.

At least the anarchic post-apocalyptic Earth will have a nice backdrop, then…