Boeing reported its first annual loss in more than two decades Wednesday, as the 737 Max ― a once-promising line of commercial jets whose flawed control systems played a role in two deadly crashes ― remains at the center of a historic safety crisis.

Boeing closed out the fourth quarter with $17.9 billion in revenue, the company announced Wednesday, a 37 percent decline from the fourth quarter of 2018. The company’s 2019 net losses of $636 million mark its first annual loss since 1997.

The losses stem from the continued worldwide grounding of Boeing’s Max jets and a production halt this year in the wake of two fatal crashes.

Once a cash-generating machine that was the envy of its competitors and a darling of Wall Street, Boeing has been forced to borrow billions of dollars to cover the cost of building airplanes it can’t deliver to customers.

The company reported Wednesday that it owes creditors $27.3 billion, not including a separate $12 billion it is currently negotiating, executives said Wednesday.

Boeing has been forced to compensate airlines for the cost of flight cancellations, taking a $5.6 billion charge in July. And a bruising congressional inquiry has pointed to deeper problems with the company’s management culture, leading to the ouster of two high-ranking executives.

Wednesday was also the first earnings release for new CEO David Calhoun, a long-time Boeing board member. In a call with skeptical stock analysts Wednesday morning, Calhoun sought to cast himself as a reformer unafraid of confronting difficult truths.

“My job is to get on with it, and make the changes that I always thought were necessary,” Calhoun said in a call with reporters.

He pushed back on the implication that he is too much of an insider to turn the page on the company’s recent mistakes.

“When a board reaches a decision to change out the CEO, there is a recognition that things need to change,” he said, "And they recognize the arguments presented from the outside world as legit. That’s where we are.”

The company has incurred another $2.6 billion in costs related to the indefinite grounding, and it expects the grounding to cost it an estimated $4 billion throughout 2020, something that should put a drag on future results.

The company’s stock price has lost about 13 percent of its value over the past year at a time when the market has surged. Despite the bad quarterly results, Boeing stock opened 2 percent higher Wednesday compared to the previous day’s close, and it rose 2.6 percent by early afternoon.

Bank of America analyst Ron Epstein, who covers the aerospace and defense markets, estimates the Max crisis has cost the company $18.3 billion. Assuming the aircraft is cleared to fly again by May, Epstein said, those costs should exceed $20 billion.

The 737 Max “is maybe a $30 billion exercise between developing the plane and cleaning it up," Epstein said.

There are also problems in the company’s Arlington-based defense, space and security division, which also stumbled in the last quarter after several years of stable growth. Boeing took a $410 million charge in case NASA requires it to repeat a test mission of the spacecraft it is developing to fly astronauts to the International Space Station.

In December, Boeing’s Starliner spacecraft suffered a software problem and failed to reach the correct orbit during a test flight with no astronauts on board. NASA is investigating what caused the spacecraft’s on board clock to be 11 hours off and whether to require the company to perform another test mission.

The 737 Max has been out of commission for more than 10 months as regulators remain unconvinced it is safe to fly. It was grounded in mid-March when the Federal Aviation Administration recognized similarities in a pair of deadly plane crashes in Indonesia and Ethiopia, both of them involving new 737 Max jets, that killed 346 people.

Boeing later admitted that a new flight-control program, interacting with bad data from the planes’ external sensors, had in both cases pushed the jets into an uncontrollable nosedive.

The FAA has made the jets’ return to the sky contingent on a set of software and display changes designed to prevent the same problems from occurring again. But the timeline for approval has continually shifted over the past year as regulators discovered more problems with the plane. The company now estimates that it will be able to return the Max to flight in “mid-2020,” although it emphasized that the timeline is up to regulators.

Throughout most of 2019, Boeing continued churning out new planes under the assumption regulations would soon clear them to fly. However, in December, the company announced it would indefinitely halt production of the embattled jets.

That production halt has rippled throughout the company’s supply chain, resulting in about 2,800 layoffs at Spirit AeroSystems in Wichita. About half of Spirit’s revenue comes from supplying parts to the Max.

In addition to scrutiny over the Max jets, the company has faced wider criticism about its culture.

The crisis has raised questions about whether Boeing’s top management understands the company’s own production lines, analysts said. The Chicago-based corporate office has come under criticism for being too focused on Wall Street, at the expense of the company’s Seattle-based production lines.

“Chicago has been a distant asset manager that’s there to extract cash. That needs to change,” said Richard Aboulafia, a longtime aerospace analyst with Teal Group.

Aboulafia attributed Boeing’s broader problems to a “combination of bad communication and very aggressive wage and conditions pressure in the midst of unprecedented prosperity,” calling it a “mixture for a toxic soup.”

Internal messages between Boeing employees were recently disclosed to congressional investigators. The messages, made public last month as part of a long-running investigation into how the Max was designed and certified, could further damage the company’s relationship with regulators and the flying public.

One Boeing employee said in 2018, “I still haven’t been forgiven by god for the covering up I did last year.” Another said, “This is what these regulators get when they try and get in the way.” And in 2017, long before either of the crashes, a Boeing employee wrote, “This airplane is designed by clowns, who in turn are supervised by monkeys.”

In a call with reporters Wednesday, Calhoun called those messages “horribly embarrassing and not typical of what Boeing employees do,” calling it a “microculture” within the company that nonetheless needs to be changed.

Calhoun, who signed off on many of his predecessor’s decisions as a Boeing board member, attributed his company’s problems to a lack of discipline.

The 737 Max’s flight control systems “failed to deal with a boundary decision in an environment we should have known something about. ... The regulators made the same mistake,” he said.

The mistakes that grounded the Max “really were relegated to a relatively small group of folks, but it wasn’t detected,” he said. “The system apparently didn’t listen or watch for things like that and it didn’t react appropriately.”

He agreed to take responsibility in his new role as CEO.

“I have to do everything in my power to make sure going forward that it does [catch mistakes], and it starts with me."

Douglas MacMillan and Christian Davenport contributed to this report.