A Southwest Airlines flight flying from New York City to Dallas turned terrifying Tuesday morning, when the left-side engine failed at 32,500 feet. Debris from the engine, which appears to have exploded, punctured the fuselage, leading to the violent depressurization of the cabin. Oxygen masks above every passenger dropped from the ceiling of the plane, and the pilots quickly brought the Boeing 737 to below 10,000 feet, where the 144 passengers and five crew could breathe, before making an emergency landing about 22 minutes later, in Philadelphia.1

The National Transportation Safety Board, which is now investigating, says that one person was killed, but did not share her cause of death. It marks the first fatality on a US airline flight over American soil since 2009.

Photos show a gaping hole where a window was on the 737, and outside a mangled mess of engine cowling, with the white-on-blue Southwest lettering crumpled like a soda can. According to a local NBC affiliate, passengers say the woman who died, sitting in the 14th row, was partially drawn out of the broken window before being pulled back in.

This sort of incident is incredibly rare, and the combined engine loss and cabin depressurization presented a particularly dangerous, complicated scenario, even for well-trained pilots.

The first thing the pilots would have heard or felt is a bang, and then a strong jolt as power from one engine cut out. The jet immediately banked 41 degrees to the left—twice as sharp as a standard turn. As the pilots corrected course, the plane issued audio and visual warnings. The pilots would have felt the depressurization, as pain in their ears. And then they would have started running through their emergency checklists.

“They get the idea ‘we’ve lost an engine, and lost pressure—we need to get down,’” says Douglas M. Moss, an aviation consultant with AeroPacific Consulting, who flies the Boeing 757 and 767.

First, the pilots put on their own oxygen masks and make sure the air is flowing. Stored in consoles, these typically look more like what fighter pilots wear than the flimsy yellow cups that drop onto passengers. Then they start heading for the ground. People can breathe at around 15,000 feet, but pilots aim to get below 10,000 to be safe. They don’t want to push an already damaged airframe into a steep dive, but drop as quickly as possible. Modern airliners can descend 20,000 feet in about 90 seconds. On the way down, having lost power on one side, the pilots would adjust their rudders, flaps, and other flight control surfaces to keep the aircraft balanced.

Based on photos and video passengers posted to Facebook, it seems most people remained calmly in their seats, with their oxygen masks on. (Many had the mask over just their mouths, but if you pay attention to the safety briefing—and this a reminder to do so—it should cover your mouth and nose, and you should breathe normally.)

The pilots don’t reach out to air traffic control until that descent is underway. “Something we teach students from day one is aviate, navigate, communicate—in that order,” says Brian Strzempkowski, who trains pilots at Ohio State University’s Center for Aviation Studies.

“They’d say mayday three times, say their call sign, engine failure, descending to 10,000 on heading of XYZ,” says Moss. The pilot, air traffic controllers, and an airline dispatch unit work to find the best airport for an emergency landing. In less critical circumstances, it may be better to fly a little farther to a larger airfield with more facilities, but in extreme emergencies—such as this one—the pilot can ask for priority, and the controllers will clear the path for her to land at the closest runway, in any direction.