China didn’t waste any time reacting to the tragic crash of a Boeing Co. 737 Max operated by Ethiopian Airlines Group on Sunday. Less than 24 hours after the accident, it became the first country to ground the plane. In the hours and days that followed, Ethiopia, Europe and—finally, on Wednesday—the Federal Aviation Administration in the U.S. followed Beijing’s lead. The grounding of Boeing’s most profitable plane is now global.

As evidence accumulates that the Ethiopian disaster bears similarities to the crash of a 737 Max operated by Indonesia’s Lion Air in November, a flying ban now seems like the obvious move. Nonetheless, Boeing, which at first resisted such a drastic step, owes China a debt of gratitude. Beijing’s early action likely sped up the process and ensured that Boeing’s reputation wasn’t further damaged in the eyes of aviation regulators, airlines and—most crucially—the rapidly expanding flying public in China, one of the planemaker’s biggest and most important markets.

This isn’t the first time that a foreign country or airline has prompted Boeing and the FAA to ground a troubled new aircraft. The Boeing 787 Dreamliner twin-aisle aircraft, launched in 2011, experienced several safety issues during its first year of service, including cracked windows, fuel leaks and battery fires. On Jan. 7, 2013, a lithium-ion battery caught fire in a Japan Airlines Co. Ltd. 787 that had just arrived in Boston from Tokyo.

Four days later, the FAA called a press conference and announced that while it would initiate a “high-priority” review of the plane with Boeing’s cooperation, it wasn’t ordering airlines not to fly the jet. Five days later, a Dreamliner operated by Japan’s All Nippon Airways Co. Ltd. (the plane’s launch customer) was forced to make an emergency landing due to a lithium-ion battery fire. ANA and Japan Airlines grounded their 787 fleets the very same day. Only then did the FAA ground U.S. 787s; the rest of the world followed suit.

The two Japanese carriers obviously acted with passenger safety in mind. But, they also had their own survival and that of the Japanese aviation industry to consider. Japanese companies are key suppliers for the 787 (for example, Mitsubishi Heavy Industries Ltd. supplies the wings), and ANA and Japan Airlines were planning long-haul businesses built upon the fuel-efficient Dreamliner. A grounding, whatever its costs, was better than being stuck with a plane that passengers didn’t trust and airlines wouldn’t buy.

Today, China finds itself in similar circumstances. Though it hasn’t lost a 737 Max, the jet is flown more in China than any other country, leaving its airlines highly exposed to both safety and consumer concerns related to Boeing. In the next decade, China is set to grow into the world’s biggest aviation market, from its current status as No. 2. Not much is likely to derail that ascent. But, at least in the short-term, accidents and airplanes that scare off Chinese consumers—a demographic famously and justifiably sensitive to product-safety scandals—could be problematic.

In 2014, for instance, Chinese passenger volume on Malaysian Airlines Bhd. fell by 60 percent in the wake of the MH370 disappearance; it took the airline nearly two years to restore confidence. A similar consumer aversion to flying the 737 Max would be highly disruptive at best.

The damage could extend well beyond Chinese airlines. In 2017, Boeing and the Commercial Aircraft Corp. of China established a completion-and-delivery center 90 miles from Shanghai where Boeing aircraft will be flown for final touches, such as installing seats and cabin equipment and, eventually, exterior painting. In December, the first plane finished at the center—a 737 Max—was handed over to Air China. Eventually, the center is expected to complete around 100 planes per year, primarily the 737 Max.

The business is important not just for Boeing but for China, which not only is keen to hold onto jobs during its current slowdown but has made no secret of its desire to build its own aviation industry, in part by learning from foreign competitors.

Under these circumstances, it’s no surprise that China rushed to ground the 737 Max. Yet even then, by some accounts, Chinese officials expected the FAA to act first. When the U.S. agency appeared to dither, “we took the lead,” according to one high-ranking Chinese regulator. Boeing, increasingly dependent upon China for its sales and profits, should be grateful they did.