On July 12, some passengers were still boarding their American Airlines  (AAL)  flight to Miami from San Francisco International Airport (SFO) when smoke coming from a fellow passenger’s purse prompted an immediate evacuation.

As it turned, the cause of the fire was one about which airlines have been sounding the alarm for years now: a laptop battery. One traveler told a local branch of ABC News that the cabin had started to smell “like burned cables” and only got stronger as passengers were looking for their seats.

Related: Airlines’ Scariest Problem Is This Common Carry On Item

Crews from the San Francisco Fire Department rushed to put out the fire but, in the chaos around multiple people trying to exit the aircraft at the same time in a panicked rush using evacuation slides, three passengers sustained minor injuries. Everyone aboard the flight was shuttled back to the terminal and had to wait until Flight 2045 was cleared to take off.

‘A light stampede, people screaming ‘fire in the back’

Some of the video of the incident shared on social media showed fire crew placing the offending laptop in a tub of water to extinguish the flames.

More Travel:

A new travel term is taking over the internet (and reaching airlines and hotels)The 10 best airline stocks to buy nowAirlines see a new kind of traveler at the front of the plane

“Someone’s bag caught on fire in the cabin of AA2045 at SFO an hour right before we took off and it wasn’t even a Boeing  (BA)  plane,” Chris Vogt, a software engineer aboard the flight, wrote on the social media platform formerly known as Twitter. “There was a light stampede, people were screaming ‘fire in the back’ and rushing towards the doors but supposedly everyone is OK.”

In a statement on the incident, American Airlines confirmed that “smoke was reported from inside a customer’s bag.”

Related: Get the best cruise tips, deals, and news on the ships from our expert cruiser

Here is why phone and laptop batteries so frequently catch fire on planes

“The bag was quickly removed by our crew members and all customers exited the aircraft,” the airline wrote further. “We thank our crew members for their professionalism and apologize to our customers for the inconvenience.”

Most modern phones and laptops contain a type of lithium battery that is particularly prone to overheating and short-circuiting in a chemical reaction known as thermal runaway. While such a situation rarely causes more than a momentary shock on the ground, the blaze that can be sparked in a confined environment aboard a plane is a much bigger risk.

In February 2023, a United Airlines UAL flight from San Diego to Newark was diverted back to its destination shortly after taking off “after a customer’s battery pack ignited.

While the U.S. government has occasionally weighed the option of banning larger laptops and battery packs from being brought aboard planes, the current Federal Aviation Administration (FAA) rules require only that all products containing lithium batteries be inside the plane cabin rather than checked with one’s baggage. But given that almost everyone has a cell phone they will bring aboard, the expectation is that such cabin fires will periodically occur.

“The device could have been subjected to thermal, electrical, or physical abuse prior to placing it in the bag without the passenger realizing the potential threat these items pose,” the FAA wrote in its protocol guidance on lithium fires for airline crews. “In the cabin the bag can either be placed under a seat or in the overhead bin, where the battery could undergo thermal runaway and ignite the contents surrounding itself.”

Related: Veteran fund manager picks favorite stocks for 2024