Looking at the burnt, shattered hull of the Boeing 777 jet that crashed upon landing at San Francisco International Airport on Saturday, it’s tempting to say the survival of all but two of the 307 passengers and crew was a miracle. The jumbo jet came in at a frighteningly low altitude after a long trans-Pacific flight from South Korea and then, according to passenger reports, seconds before landing, smashed into the edge of the airport runway, tearing off its tail before spinning on its belly. A fireball erupted, shrouding the plane in clouds of black smoke as rescue crews ran to the scene and passengers climbed out through aircraft doors and the holes that had been ripped into the hull.

The fire eventually incinerated the aircraft’s core with such intensity that it burned through much of the roof. But by then, everyone had gotten out alive, except for two 16-year-old Chinese students — Ye Mengyuan and Wang Linjia — whose bodies were found on the tarmac. The survival of so many in such dire circumstances does seem like divine luck. But aviation experts point out that fatal jumbo-jet crashes are very rare. The last one in the U.S. happened more than 10 years ago in 2001, when a plane crashed in a New York City neighborhood.

In the meantime, we have been amazed to see passengers walk away from crumpled, singed wrecks like the Asiana plane or Air France Flight 358, which turned into a fireball after overshooting a Toronto runway in 2005, or another Boeing 777 that crashed on landing at London’s Heathrow airport five years ago, but saw no fatalities.

While more than 100 people were injured in Saturday’s crash, some seriously, these relatively good outcomes typically happen after what are called “low-impact survivable” incidents when the plane has slowed to 140 or 150 m.p.h. (225 to 240 km/h), are due in part to changes in airplane construction to include better safety doors, seat technology, exit chutes, fireproofing and incident protocols. “Thirty years of design improvements have made a huge difference in the ability to get everyone off the plane in less than two minutes,” explains Larry Rooney, a veteran pilot, National Transportation Safety Board–trained accident investigator and executive vice president of the Coalition of Airline Pilots Associations.

(MORE: Photo: Inside the San Francisco Plane Crash)

In addition to plane modifications, emergency-response crews are equipped with ever better technology. The first task of responders at a fiery crash site is to secure escape paths for victims using foam and water. “You establish where the fire is and attack from a downwind position,” explains Tom Kinton, who has had many roles running Boston’s Logan Airport over his 35-year career, including director of aviation and is now a strategic consultant with ICF SH&E, an aviation consulting firm. “You want to push the fuel away from the victims coming down the chute and buffer the route with foam,” he says. New fire trucks typically carry 2,000 gal. (7,570 L) of water, and many are equipped with infrared cameras to see through fog and scan the fuselage for hot spots. “They can even pierce the fuselage, and so you can put your [fire-retardant] agent where you think the fire is rather than guessing,” says Kinton.

And then there’s the matter of figuring out how many people they’re trying to find, which is crucial and has been aided somewhat by cell phones and other computer technology. The rescue crews will ask for the plane’s manifest immediately. “You’re looking to mirror that manifest, find how many passengers just got off and ran, how many got picked up and are at hospitals. It takes time and it’s got to be accurate because the crews that are risking their lives to go on the airplane won’t stop looking until everyone is accounted for.” Kinton recalls a terrible 1982 crash of a DC-10 in Boston, where two days after divers had stopped looking for survivors, endangering their own safety in the frigid waters of Boston Harbor, a family came looking for their husband and son who were not registered. “We went back into the water, but we never found them.”

Airport directors, airline manufacturers and emergency-crew leaders around the world will soon get a chance to pore over the data now being collected in San Francisco about everything from the unique mechanics of that plane, to the psychological state of the crew and the exact metrics of the local emergency response measured in seconds. For most, it’ll be a kind of endless dress rehearsal as they continually refine their local protocols to account for every permutation of disaster. And it is likely to take years to name the probable cause of this particular disaster in an official NTSB report.

(PHOTOS: Boeing 777 Crash-Lands at San Francisco Airport)

Some cases, especially ones like this, where the weather was good and both the airline and the plane model has a good safety record, can be particularly difficult. “One of the things they taught us in accident school is to never fall in love with a theory, the thing that you think [is the cause] at the onset might not be.” Which is why Rooney cautions against linking this Boeing 777 crash with the Boeing 777 incident that happened, also on landing, in London in 2008. After an extensive investigation by British authorities, which included researchers recreating the exact temperature and structural conditions of the engine fuel tubes that they believe became clogged with ice causing the crash, worldwide guidelines were issued to prevent future instances of what was a very-difficult-to-replicate confluence of events, temperature changes and engine construction.

“Every aircraft is unique,” says Rooney. Even if they are the same model of plane, it could have one of several types of engines manufactured by different companies, he explains. And there are other things to consider, including the amount of wear and tear on that plane by the number of cycles — takeoffs and landings — it has undergone in its lifetime. Long-range jets like the “Triple 7” tend to have fewer of those cycles than other planes. And of course there are human factors at work as well, which are investigated by specially trained NTSB experts. “You don’t just walk in and say it was Colonel Mustard in the conservatory with a lead pipe,” says Rooney. “It’s a very regimented process.”

One thing that the NTSB’s investigators will evaluate is the fatigue levels of the crew and their experience with this particular aircraft. In January of 2014, sweeping new rules will go into effect in the United States regulating the number of hours pilots can fly based on the latest science indicating not only how many consecutive hours a pilot fly before encountering fatigue related cognitive decline, but when those hours are logged. “Operating between 11pm and 6am takes a very different toll than daytime hours,” says Rooney whose trade association lobbied for the changes. “The new rules will be a really good thing for the industry, the crews won’t be as exhausted.” They also have pushed for pilots to have more experience in the cockpit before being licensed. Then there’s flight time. The pilot in Asiana crash apparently had less than 50 hours flight time in the Boeing 777. While Rooney is loathe to speculate about this particular crash until all the data has been analyzed by the NTSB, he says that the investigators will be looking at the level of experience of the crew. “There’s absolutely nothing that substitutes for experience whether you’re talking about being a surgeon, or a pilot or even in a marriage,” he says.

In most cases, response teams around the country who will be studying the reports coming out of San Francisco will go their entire careers without encountering anything like yesterday’s crash. “You pray and you hope it doesn’t happen. You drill them, you train them, but it’s not like fighting house fires in a big city where those things happen all the time,” says Kinton. “Lots of airports send a ‘go team’ to any accident in the continental U.S. because that’s the closest any of them will get to an accident.” Kinton gave his teams, which were usually made up of a firefighter, police officer and operations person, a sobering directive for their visits to other airport crash sites: “Visualize this at Logan.”

MORE: Recap of the Tragedy in San Francisco