(CNN) -- "Here comes the sun" indeed, and it was just barely all right.
Two years ago, modern infrastructure came very close to a serious disruption. The culprit? One of the largest solar storms in recorded history.
Plasma exploding from the surface of the sun in a coronal mass ejection barreled through space and crossed through Earth's orbital path on July 23, 2012.
If the flare had erupted about one week earlier, Earth would have been squarely in the line of fire, Daniel N. Baker wrote in a study published in the journal Space Weather. (Baker is with the Laboratory for Atmospheric and Space Physics at the University of Colorado).
This is not the first time solar activity has threatened Earth.
A massive solar storm in 1859, dubbed the Carrington Event after the English astronomer who witnessed it, caused the northern lights to appear as far south as Cuba; and it caused telegraph lines to spark, setting fire to a number of buildings, according to Science@NASA editor Dr. Tony Phillips.
"According to data from the STEREO-A spacecraft (a solar observatory), the solar storm of July 23, 2012, was every bit as potent as the Carrington storms," he said.
Baker said that had our planet been in the path of the storm, it would not be inconceivable that we would still be "picking up the pieces."
Phillips agrees. "As society relies more and more on high technology such as GPS, the Internet, satellite communications and smart power grids, we also expose ourselves more and more to the dangers of stormy space weather."
He added that power outages after the storm could have persisted for many months. If the solar storm had hit, much of Earth's technology would be rendered inoperable: from radios and GPS systems to toilets.
Though human beings would not be physically harmed directly, a study by the National Academy of Sciences estimates that damage from a coronal mass ejection of similar magnitude could exceed $2 trillion in the United States and pose risks to national security.
While Earth did get lucky in 2012, humans should not get too comfortable. Despite the relatively mild conditions on the sun, solar storms are unpredictable. According to Baker, "incredibly powerful" space weather is possible at any time.
™ & © 2014 Cable News Network, Inc., a Time Warner Company. All rights reserved.