This Friday, Europe’s largest freight carrier, Cargolux, will ban bulk shipments of lithium-ion batteries from its freight planes. Last month, an international group of airplane manufacturers urged airlines to ban shipments of the batteries on passenger planes, and last year a Boeing Dreamliner was grounded after its lithium-ion battery started to overheat.

A study published today in Nature Communications shows exactly why airlines are taking such a cautious approach towards their cargo and power sources. In the study, researchers were able to image a lithium-ion battery exploding for the first time using CT scans and thermal imaging. Previous studies examined batteries before and after they exploded, but this study recorded what happened during the kaboom.

Lithium-ion batteries are everywhere, used to power such ubiquitous tech as cell phones and laptops, as well as parts of airplanes. They don’t explode or catch fire often, but shipping them in bulk ups the risk that one might overheat–setting off a catastrophic chain reaction throughout the closely packed shipment.

To get a good picture of what this disaster might look like, the researchers heated two commercial lithium-ion batteries and recorded the resulting explosion, using imaging techniques to get a sense for what was going on inside each battery before it blew. In the first battery, which had built-in internal support, the material inside the unit got so hot that it eventually sprayed molten liquid and superheated gas in jets out of the top of the battery.

In the second test, using a battery that didn’t have internal support, the battery ends up literally blowing its top, sending the cap of the battery flying off.

The researchers hope that their work can help engineers to design better batteries with additional safety features. That way, in the future, flying batteries might not be the stuff of an airline’s nightmares.