Fear your exploding smartphone no more. Scientists have designed a heat-activated molecular fire extinguisher that could make lithium-ion batteries safer. These power sources are widely used in cellphones, laptops, and all-electric cars, such as those produced by Tesla Motors. And though scientists continue to make the batteries better, there’s always a risk they’ll catch fire. Today in Science Advances, researchers present a solution, showing that a common phosphorous-containing flame retardant called TPP can quickly quench a fire when added to the electrolyte solution that transports current between the positive and negative terminals of the battery. Improving safety comes with a big compromise though: sacrificing power. TPP dampens the electrolyte’s conductivity, so the researchers designed a capsule to keep the two components separate. Micrometer-sized fibers of a heat-sensitive polymer coating were spun around TPP, and when the battery’s heat starts to go haywire, the polymer coating melts, releases TPP into the electrolyte, and stops the flame in under a half-second. The system could be placed in between the positive and negative nodes of lithium-ion batteries, which will hopefully prevent self-driving electric cars from meeting the same fate as those flammable hoverboards of Christmas-past.