The production line of the 737 Max is back up and running after six months of dormancy. The Federal Aviation Administration recently has completed a series of test flights and is now studying the data to assess the safety of the plane, once derided by a congressman as a “flying coffin” after a pair of crashes that killed 346 people.

The moves represent significant steps forward for the beleaguered company as it tries to regain its footing and restore its reputation after the twin catastrophes of the 737 Max scandal and the coronavirus pandemic, which has crippled airline traffic and left dozens of planes parked on tarmacs for months.

The company has said it is confident it will weather what has been one of the most tumultuous periods in its more than 100-year history. Boeing chief executive David Calhoun told investors in late April that the company would be able to resume deliveries of the 737 Max, which has been grounded for more than a year, this quarter.

“Our industry and our company will get through this,” Calhoun told employees in a companywide email that announced Boeing would lay off 10 percent of its workforce. “Air travel has always been resilient over the long term, and our portfolio of products, services and technology is well-positioned for the recovery that will come.”

But the future of the Max and the company’s fate remain far from certain, and reopening the production line may represent misplaced optimism after a series of staggering setbacks across a range of programs.

It’s not clear when the FAA might declare the planes safe enough to fly, or when the airline industry might bounce back, as portions of the country are seeing case spikes that could discourage travel for the foreseeable future.

FAA Administrator Stephen Dickson said recently that the agency is “not on any timeline” to certify the Max fleet. Airline travel will come back, “but it will be slow and gradual and filled with a number of fits and starts,” said Ken Herbert, an analyst at Canaccord Genuity.

And Boeing’s challenges are not limited to its commercial aviation division. For years, Boeing’s Defense, Space and Security division has struggled with the KC-46 tanker refueling airplane it is building for the Pentagon, with $4.6 billion in cost overruns. The Space Launch System rocket the division is building for NASA is years behind schedule and billions over budget, and has yet to fly.

And its Starliner spacecraft suffered a major malfunction shortly after it reached space late last year and is now grounded while the company investigates.

The problems with all four programs encapsulate Boeing’s recent struggles and go to the heart of its core business: flying.

But they also provide a glimpse into how the company is fighting back, struggling to redeem itself and get its vehicles back in the air.

Under the leadership of Calhoun, who replaced the ousted Dennis Muilenburg as CEO just six months ago, the company has moved aggressively. It has closed plants, laid off 12,000 workers and taken on $25 billion in debt to keep it afloat.

Now, company officials say, those measures are beginning to pay off.

A significant step came late last month, when the FAA performed a series of test flights of the 737 Max to assess the software upgrades Boeing has implemented in the wake of the fatal crashes.

“While completion of the flights is an important milestone, a number of key tasks remain, including evaluating the data gathered during these flights,” the FAA said in a statement. “The agency is following a deliberate process and will take the time it needs to thoroughly review Boeing’s work. We will lift the grounding order only after FAA safety experts are satisfied that the aircraft meets certification standards.”

And given the severity and complicated nature of the problems, the process may take quite some time, said Michael Goldfarb, a former FAA chief of staff.

“The remedy for the problem that brought both planes down has become a problem in and of itself,” he said. “Without starting from ground up on this aircraft to look at every component, the Max should not fly again.”

But Boeing officials have said they are optimistic that the planes will be back in service by the end of the year and that the airline industry will return to pre-coronavirus levels within a few years.

“As people begin to relive their lives, we expect that they will also get back to traveling,” Calhoun told the “Today” show in May. “And as long as we can demonstrate the safety of our industry, the safety of our airplane experience, we believe we will return to a growth rate similar to the past, but it might takes us three, five years to get there.”

To help assuage wary passengers, Boeing has launched a “Travel Confidently” campaign to highlight the safety features of its aircraft, including the high-efficiency air filters in the cabin that trap more than 99.9 percent of particulates. The air in the plane is exchanged every two to three minutes, the company said. And the air flows from the ceiling to the floor, reducing the risk of infection.

Boeing officials have said the reopening of the 737 Max assembly lines has been done cautiously and deliberately in anticipation of a return to service. The company has not reported a spike in coronavirus cases since workers returned, and union officials say they are generally supportive of how the company has adapted.

“A lot of the precautions being put into place are helping,” said Jon Holden, the head of Local 751 of the International Association of Machinists, which represents thousands of workers at the company’s Puget Sound facilities. “It’s the masks, it’s the hand sanitizer, it’s the cleaning and it’s the fact that everyone is taking this seriously.”

He said the reopening is “not without its challenges. There’s certainly times where they’re running short of [protective] supplies. So we continue to follow up on those types of things.” And there have been times when union officials have had to call for work to stop because of unsafe conditions, such as people working too closely together or work areas that have not been cleaned between shifts.

But on the whole, he said, workers were glad to be back at work.

“I’m glad they are starting up the line,” Holden said. “We have a lot of concerns over the job loss caused by covid.” The workforce has already been hit hard by layoffs and any more would be “the kind of action that can devastate a community and a workforce.”

The company is optimistic that the market for the new fuel-efficient planes will be robust. But it has seen a wave of postponements and cancellations, including one on June 29, when Norwegian Air Shuttle said it was canceling an order of 92 of the 737 Max jets.

While the FAA examines how the 737 Max software operates, Boeing’s Space Launch System rocket is also getting a thorough review from NASA. The rocket, which NASA hopes will take astronauts to the moon by 2024, has begun a series of eight tests known as the “Green Run” that would give the space agency the confidence to finally fly it. The rocket is years behind schedule, and way over budget, a symbol, critics have said, of Boeing’s poor performance and NASA’s struggles to manage big programs.

But late last year, NASA Administrator Jim Bridenstine celebrated the completion of the assembly of the rocket’s core stage. And recently, NASA said it took another significant step forward when it successfully powered up the rocket’s flight computers and avionics, completing “a thorough systems checkout” of the “most powerful rocket we’ve ever built.” The space agency is hoping to fly it for the first time next year.

Boeing’s “team has been hitting milestone after milestone even with COVID interrupting their work,” Leanne Caret, the president and CEO of the company’s Defense, Space and Security division, said in a statement to The Washington Post. “The rocket is in the test stand, the team is moving steadily toward this year’s hot-fire test and, at this time next year, I believe we’ll be within striking distance of launching the most powerful rocket ever built.”

Boeing is also scrambling to prove it can fly astronauts safely to low Earth orbit. In December, a test flight of its Starliner spacecraft without any astronauts onboard ran into trouble as soon as it reached orbit. A software problem reminiscent of the issues with the 737 Max made the spacecraft think it was at a different point in the mission. As engineers moved to fix that problem, they uncovered another that could have caused the service module to collide with the crew module when they separated in flight. They were able to quickly send up a software fix to that problem so that the two modules separated cleanly.

The problems prevented the spacecraft from docking with the International Space Station, and Boeing had to bring the spacecraft home after just two days.

Since then, NASA and Boeing launched an investigation, and Boeing said it has better integrated its hardware and software teams, and has taken a hard look at its culture and processes. It’s also reviewed all 1 million lines of code in the spacecraft “resulting in increased robustness of flight software,” the company said in a statement to The Post.

It said it is “making excellent progress in readying two Starliner spacecraft” — one that would repeat the test flight without astronauts onboard expected later this year, and then one with a crew of three, which could come sometime next year.

The stakes for both those launches could not be higher.

“They need to nail them and prove they can stick to the schedule,” Canaccord’s Herbert said. “They need to get their mojo back in space. From a public relations perspective and in the eye of the customer, they’ve lost a significant amount of credibility.”

Nearly a decade after winning the Air Force contract to build a fleet of KC-46 Pegasus aerial refueling tankers, Boeing’s assembly lines outside of Seattle have been busy. The company has delivered 34 of the planes so far.

But the military has said it won’t be able to use them for most missions until at least 2023 because of persistent technical flaws.

The plane’s boom, the long tube through which fuel is transferred, isn’t flexible enough to safely link up with smaller jets. And the Defense Department’s testing office has determined that the complicated camera system that guides the boom into place isn’t accurate enough. The Air Force also has repeatedly found trash, wrenches and other debris scattered inside newly delivered jets.

While Boeing works on fixing the problems, the Air Force has been forced to rely on an aging fleet of KC-10 and KC-135 tankers whose average age is close to 60 years old.

In a recent interview with The Post, Boeing KC-46 program manager Jamie Burgess expressed optimism about the program’s direction.

“This program has been challenged in the past … that’s no secret and certainly not news to anyone,” Burgess said. “But the program is on a very positive path forward.”

In an interview with CNBC, Air Force Chief of Staff Gen. David Goldfein said that soon after Calhoun became CEO at Boeing, they had a “very frank discussion” about the troubled program.

“Listen, I’m not seeing the resources being placed against this program that need to be placed,” he recalled saying. “I’m no longer interested in half measures when it comes to remote visual system, and quite frankly I’m not seeing the talent from the company on this program that I should be seeing.”

Since then, he said, there has been marked improvement.

“I’m far more confident today in the performance and the behavior of Boeing on the KC-46 than I [have] ever been in my entire time here,” Goldfein said. “And I give the new CEO a lot of credit for being a man of his word.”

Clarification: An earlier version of this article said Boeing’s KC-46 Tanker contract was awarded nearly two decades ago. The contract was awarded in 2011.