Earlier this morning the Villarrica volcano erupted in Chile, forcing thousands of residents and tourists to flee from the city of Pucón. Images of the eruption show a towering lava fountain glowing against the dark backdrop of the pre-dawn sky. One image, distributed by the Associated Press shows something even stranger: lightning, arcing through the cloud of ash.

The weird appearance of lightning during volcanic eruptions has been documented for some time now, but until recently, scientists weren’t sure what caused the lightning bolts to appear. They were pretty sure it had something to do with the particles of ash from the eruption getting an electric charge as they spewed out of the volcano, but nobody could figure out how the charge got there. And getting a closer look wasn’t exactly an option, since directly observing a volcanic eruption isn’t the safest thing to do. Ash, lava, lava bombs … there’s a reason that the area around Villarrica was evacuated.

But in 2013, there was a breakthrough. Scientists at Ludwig Maximilian University of Munich managed to create volcanic lightning in a lab, suspending particles of volcanic ash (gathered from sites around the world) in argon gas, then forcing the concoction through a narrow tube and into a tank. The process mimics an eruption, when particles go from a compressed environment under the earth’s surface into the atmosphere. The researchers videotaped their experiments and found that the particles of ash manage to charge each other through friction, just rubbing against each other during the ‘eruption’. When the charged particles enter the tank, energy is discharged, creating tiny lightning bolts.

In nature, those tiny lightning bolts can be huge, making for some spectacular photos of eruptions that look an awful lot like a supervillain’s lair. But in this case, it’s not science fiction, just science friction.