A seat fire, thought to have been caused by a portable battery pack, forced a Virgin Atlantic flight to make an emergency landing on Thursday night. The flight was on its way from New York’s JFK Airport to London Heathrow according to the Associated Press, but was forced to land at Boston’s Logan Airport after smoke and flames started emanating from a passenger seat. All 217 passengers onboard the flight were successfully evacuated.

The fire was extinguished by the crew on board, and upon landing an investigation discovered wires protruding from the affected area. “A battery pack consistent in appearance with an external phone charger” was found between the cushions of the seat that ignited, according to police.

For people asking. Was told there was a fire and we would have an emergency landing shortly. Everyone could smell the smoke but was not told what the problem was until we landed. Once we landed all we were told was, there is a fire in first class. pic.twitter.com/R1dJBrcX6s — Cory Tanner (@Ctannerweb) July 5, 2019

It’s not yet clear exactly why the battery pack caught fire, but there are many aspects of modern lithium ion batteries that can make them a potential fire risk. Using an incompatible charger can drive too much current into a battery, defects can allow a battery to be overcharged, and batteries can start to smoke or even catch fire if they get too hot. Most battery packs include safety mechanisms to shut down a device if a problem is detected, but these safety measures can fail as we’ve seen with Samsung phones, Apple laptops, hoverboards, e-cigarettes, and just about anything else that’s battery-powered.

If the battery pack was wedged in the seat as the police report suggests, it could have been subjected to enough heat and pressure to exacerbate the process of thermal runaway.

In the US and Europe, Airlines do not allow portable lithium ion batteries to be carried in checked luggage. They are allowed in carry-on luggage but limited to a maximum of 100Wh, or up to 160Wh with prior airline approval. In some countries, airlines restrict the use of the portable battery chargers during flight due to safety concerns.

An investigation into the cause of the fire is currently ongoing by both Massachusetts state police and Virgin Atlantic.