The fact that it has taken President Trump to override his own government’s transportation officials in order to ground the Boeing 737 MAX-8 is an indication that Boeing and the world’s largest regulator, the Federal Aviation Administration, have become too close and too complacent about the role of technology in airline safety.

When Canada, with the world’s third largest fleet of MAX-8s, grounded them the FAA was left starkly alone in refusing to act. The Canadians said they acted because new data on the crash Sunday of Ethiopian Airways Flight 302 appeared to confirm similarities with the crash of Lion Air Flight 610 last October.

That data came from a new satellite-based flight tracking system still in testing that was developed as an answer to the disappearance of Malaysia Airlines Flight 370. Aireon delivered data on the erratic path taken by the Ethiopian jet that the Canadians decided followed the same pattern seen in the final minutes of the Lion Air flight.

The same data was provided to the FAA but they did not respond to it with the same urgency shown by the Canadian regulator.

A total of 346 people died in the two crashes and both are believed to involve a flaw in flight controls that forced the airplanes into a nosedive.

The widely held idea that the FAA is the gold standard of aviation regulatory agencies is another of those misplaced beliefs in American primacy based on history rather than current reality.

It is true that as the Jet Age was created and grew through a series of brilliant American innovations which set a world standard for the machines that transformed world travel the FAA was an important part of that process.

As each leap in design and technology was taken, the FAA developed the world’s most rigorous rules for ensuring passenger safety. Inevitably there was a mutual learning curve between the regulators and the manufacturers.

That learning curve was driven by the response to crashes. As each flaw was identified and rectified the rate of fatal crashes was steadily reduced over decades until, in 2017, a remarkable level of safety was reached—in that year for the first time there was not one fatal crash involving a commercial flight in the whole world.

Much of this achievement was due to reaching a careful balance between technology and pilots’ skills. It’s often feared that technology has taken over too much from the human factor, a view reflected in Trump’s tweet that “airplanes are becoming far too complex to fly.”

In fact, technology provides pilots with a level of situational awareness and critical alerts that was unimaginable at the start of the Jet Age.

And that is precisely what makes the MAX-8 catastrophes both anomalous and—probably—egregious. Two such serious crashes within months of each other have reversed what seemed to be an endlessly incremental refinement of airline safety regimes.

After the crash of Lion Air Flight 610 last October a highly experienced pilot told me: “Aviation will move on from this accident, but it represents a watershed event for considering what future pilots will be expected to do, and for what they will or will not be assumed to do.”

There is a precursor for the way both the FAA and Boeing have closed ranks to resist grounding a jet with potentially fatal flaws.

The Boeing 787 Dreamliner was a quantum leap in technology, introducing a new level of efficiency for airlines and a new level of comforts for passengers. And it has delivered: the 787 is now so highly rated by frequent flyers that they choose an airline according to whether it offers a 787.

But when it first went into airline service the 787 was swiftly overtaken by a problem so serious that it was grounded for three months. The problem was in a new technology that used large lithium-ion batteries to power the airplane’s electrical systems.

“ FAA inspectors embedded at the Boeing plant in Seattle certified that the 787 was safe to fly. ”

Two Japanese airlines, ANA and Japan Airlines, were first adopters of the 787, and both had serious incidents that led to the grounding. In January, 2013, a Japan Airlines 787 parked at a gate at Boston Logan Airport suffered a battery fire that. took almost two hours to quell.

Nine days later an ANA 787 on a Japanese domestic flight had to make a rapid emergency descent when smoke from a battery fire entered the passenger cabin.

Both airlines then grounded their 787s and on the same day the FAA ordered all U.S. airlines flying the 787 to ground them.

Before these incidents the Boeing CEO, James McNerney, said that the 787’s problems were normal for a new airplane. However, both Boeing and the FAA had known years earlier how serious a battery fire could be to the 787.

In 2010 a 787 on a test flight with more than a score of technicians on board suffered a battery failure so severe that the pilots lost the primary flight displays and auto-throttle controls. The jet made an emergency landing at Laredo, Texas. The pilots and technicians made an emergency evacuation on the runway, using slides. “If this had happened at 25,000 feet we might be talking about something much more serious” said one observer.

Nonetheless, FAA inspectors embedded at the Boeing plant in Seattle certified that the 787 was safe to fly.

In 2013, after the grounding, the National Transportation Board began an investigation into the batteries and their installation in the electronics bay.

The batteries were manufactured in Japan by GS Yuasa. The fires were caused by thermal runaways triggered by a short-circuit and were the result of poor quality controls at the Japanese plant. Industry experts warned the NTSB that battery development had moved faster than regulators could keep up with. One said that the battery technology was “very immature.”

Then why had the FAA inspectors not seen the problem? The standards the FAA used to certify the batteries were out of date before they were promulgated.

As a fix Boeing enclosed the batteries in a steel box. At the same time manufacturing of the batteries was put under stricter quality controls.

While the investigation was going on I interviewed the then-chief of the NTSB, Deborah Hersman. The NTSB has always been a strongly independent agency and Hersman was notable for the tough public stance she took about the 787 problems.

She said, “What we are seeing in the 787 investigation really raises questions about the certification process—what people should have known at the time… what did they know in 2007, because we know a lot more now.”

And she issued a warning that resonates today: “The most frustrating thing for our investigators is, if they go into another accident where they know that if their initial recommendations had been implemented this wouldn’t have happened. “

Hersman gave a specific example: the crash of a ValuJet flight in 1996 in the Florida Everglades that killed all 110 people aboard, caused by the explosion of an oxygen cylinder in the cargo hold. The NTSB had previously warned about hazardous materials in cargo bays but had been ignored by the FAA. “After that, we got the response,” said Hersman, “Things that are mandated take a very, very long time to be adopted.”

Another former leader of the NTSB, Peter Goelz, told NPR’s Morning Edition on Wednesday, responding to questions about the FAA’s handling of the MAX-8 crisis, “There are not enough inspectors on the payroll for ‘gotcha’oversight.”

He added that when European regulators grounded the MAX-8 he had such respect for them that it led him for the first time to be concerned about the safety of the MAX-8.

Boeing’s months of stonewalling after the Indonesian crash followed the pattern set during the early months of concerns about the safety of the batteries on the 787. At times it seemed more like an exercise in corporate damage control than a willingness to concede that, at the very least, they had erred in not disclosing to pilots that the airplane had, buried deep inside its avionics software, a problem that could, if not understood, endanger the airplane.

At first the FAA went along with Boeing’s assertion that the Lion Air pilots were to blame because they failed to recognize what was causing the airplane’s controls to force down the nose—a system left out of the flight manual—and failed to resort to flying the airplane manually.

Astonishingly, neither Boeing nor the FAA showed any sense of urgency about grasping and dealing with the airplane’s obvious defects. But eventually the FAA broke from the Boeing line and insisted that pilot training and manuals should be revised to include the suspect system.

Even then the FAA remained in lockstep with Boeing in resisting grounding the airplane until President Trump took the decision himself—bipartisan pressure from lawmakers was eventually more persuasive than a phone call from Boeing chief Dennis Muilenburg who had assured Trump that the airplane was safe.