By Theo Leggett of BBC
It could have been a great deal worse.
The incident that befell Alaska Airlines Flight 1282 on Friday would have been terrifying for passengers, but ultimately no-one was seriously hurt and the aircraft landed safely.
However, the picture could have been very different if the failure had happened further into the flight.
The incident happened minutes after take-off from Portland International Airport while the aircraft - a Boeing 737 Max 9 plane - was still climbing.
An unused emergency exit door blew out, leaving a gaping hole in the side of the fuselage.
The plane suffered a rapid loss of cabin pressure, as air rushed out and the atmosphere within the plane equalised with the thinner air outside.
The impact of this was reduced by two key factors. First of all, the passengers would all have been wearing seatbelts at this stage in the flight, keeping them in their seats.
Secondly, data from aircraft monitoring sites show that the plane reached a maximum height of around 16,300ft before descending quickly.
The cruising height of a 737 Max is around 38,000ft. At this level, the difference between the pressure inside the aircraft and the atmosphere outside is much greater. Had the door blown out here, the sudden rush of air would have been much more violent, and potentially lethal, especially if passengers were not wearing seatbelts.
"Passengers in the seats immediately adjacent, or in other seats around it who weren't wearing a seatbelt could have been sucked out of the aircraft", explained Tim Atkinson, an aviation consultant and former aircraft accident investigator.
"I guess the worst case could be you lose a row full of people and a couple of others standing nearby as well."
The temperature in the aircraft would also have dropped dramatically. Air at such altitudes is typically very cold, around -57C (-71F).
Passengers and crew would have been reliant on emergency oxygen. Without it they would have quickly lost consciousness.
In 2018, exactly such an incident occurred to an older model of Boeing 737 being operated by Southwest Airlines. Debris from an engine failure broke one of the cabin windows while the plane was travelling at 32,000ft.
The aircraft suffered a sudden decompression, and one passenger was partially sucked out of the window. She died as a result of her injuries.
The immediate concern in this case is whether what happened to Flight 1282 could happen to other aircraft. The door in question is meant to be securely bolted to the fuselage using four bolts. The aircraft was only two months old, meaning simple wear and tear is unlikely to have been a factor.
That is why Alaska Airlines initially chose to ground its fleet of 737 Max 9s.
The US regulator, the Federal Aviation Administration (FAA) followed suit, temporarily grounding 171 aircraft for inspections.
"It could be design, it could be a manufacturing defect, or a combination of the two. Or it could be something else, something unknown", said Mr Atkinson.
For Boeing, there is an additional problem.
The aircraft involved in the incident was a variant of the 737 Max, the latest generation of Boeing's 737 workhorse. The plane, designed to be much more fuel efficient than previous models, has been a hit with airlines. But its safety record has been badly tarnished.
In late 2018 and early 2019, two aircraft were lost in near identical accidents, off the coast of Indonesia and outside the Ethiopian capital Addis Ababa.
A total of 346 people were killed. Both crashes were caused by flawed flight control software, which ultimately forced the planes into catastrophic dives, despite the best efforts of the pilots.
Those incidents led to the grounding of the global 737 Max fleet for more than 18 months while the problem was rectified and further safety checks were carried out. The head of the FAA subsequently described the design as "the most scrutinised transport aircraft in history".
However, since the 737 Max came back into service, there have been a number of high profile problems with the programme, including electrical faults and quality control issues.
Safety campaigners have also expressed concern about the number of reported malfunctions aboard aircraft that have gone into service.
In December, Boeing called on airlines to inspect rudders on their aeroplanes, after a bolt was found to be missing on one aircraft. It said it was acting "out of an abundance of caution".
In the wake of the accidents, Boeing faced widespread accusations of putting profit above the safety of passengers.
Whistleblowers claimed the company was putting undue pressure on its employees to build too many aircraft too quickly, leading to chaotic conditions in its factories, and corners being cut on production lines.
Boeing insists it is a different company today. Its chief executive, David Calhoun, has repeatedly emphasised its commitment to the highest standards of safety, quality and integrity.
However, some critics remain unconvinced.
'Gigantic wake-up call'
Ed Pierson is a former senior Boeing manager who warned about problems on the 737 Max production line before the two crashes. He now heads an organisation called the Foundation for Aviation Safety, which has been scrutinising the aircraft's record.
He insisted that conditions inside Boeing's factories have not improved, and that the US regulator has been ineffective in holding the company to account.
"This is just a gigantic wake-up call", he said.
"This might just be a major blessing to have such a highly visible incident occur that will cause them to have to admit they have some serious problems."
Boeing has consistently denied such problems exist.
In a statement issued after the FAA ordered the most recent groundings, the company said: "Safety is our top priority and we deeply regret the impact this event has had on our customers and their passengers. We agree with and fully support the FAA's decision to require immediate inspections of 737-9 airplanes with the same configuration as the affected airplane."
Boeing is in the process of ramping up production of the 737 Max to cut waiting times for customers and reduce its backlog of orders.
Arguably, the timing of this latest incident involving its flagship aircraft could not have been worse.
Whatever the cause, it is likely to create further anxiety around the already-damaged 737 Max brand, particularly among passengers.
- This story was first published by the BBC.