When a magnitude 8.1 earthquake struck Mexico in 2017, eerie images of green and blue lights in the sky popped up on social media. The so-called Mexico earthquake lights were yet another mysterious instance of a phenomenon that has been puzzling experts for hundreds of years.

Like ball lightning, earthquake lights are relatively rare—captivating but hard for scientists to explain. Complicating matters, the instances of luminosity around earthquakes don't all look the same, sparking theories that range from plain old lightning to UFOs and otherworldly apparitions.

The lights can take "many different shapes, forms, and colors," Friedemann Freund, an adjunct professor of physics at San Jose State University and a senior researcher at NASA's Ames Research Center, said in a 2014 National Geographic interview.

Earthquake lights in history

Freund and colleagues studied 65 accounts of such lights reaching as far back as 1600, publishing their findings in Seismological Research Letters in 2014.

On November 12, 1988, for example, people reported a bright purple-pink globe of light along the St. Lawrence River in Quebec, 11 days before a powerful quake. In Pisco, Peru, the lights were bright flashes that lit up the sky, captured in security camera video before an 8.0-magnitude quake in 2007. And before a 2009 earthquake in L'Aquila, Italy, four-inch (ten-centimeter) flames of light were seen flickering above a stone street.

Are they real?

The U.S. Geological Survey is circumspect about whether earthquake lights, or EQL, really exist. "Geophysicists differ on the extent to which they think that individual reports of unusual lighting near the time and epicenter of an earthquake actually represent EQL," the agency says on its website. "Some doubt that any of the reports constitute solid evidence for EQL, whereas others think that at least some reports plausibly correspond to EQL."

Freund is in the latter camp.

What could cause earthquake lights?

Analyzing 65 earthquake light incidents for patterns in the 2014 study, Freund and colleagues theorized that the lights are caused by electric charges activated in certain types of rocks during seismic activity, "as if you switched on a battery in the Earth's crust."

View Images These earthquake lights in Quebec were recorded in November 1988. Reprinted with permission from Seismological Research Letters

Basalt and gabbro rocks, for example, have tiny defects in their crystals that could release electrical charges into the air. The conditions that lend themselves to the lights exist in less than 0.5 percent of earthquakes worldwide, the scientists estimated, which would explain why they have been relatively rare. They also noted that the earthquake lights more commonly appear before or during quakes, not as much afterward.

An earlier study proposed that tectonic stress created a so-called piezoelectric effect, in which quartz-bearing rocks produce strong electric fields when compressed in a certain way. But one of the complications in studying earthquake lights is, of course, that they're unpredictable and short-lived. In an attempt to work around this, some scientists have attempted to recreate the phenomenon in the lab.

In a study led by a physicist at New Jersey's Rutgers University and published in 2014, grains of different materials—flour, plastic disks, plaster—produced voltage spikes when agitated. The scientists attributed this effect to friction between the grains, which would contradict both the piezoelectric theory and Freund's.

As long as conflicting scientific theories emerge, the debate over causes of earthquake lights stands to remain charged.