When NASA confirmed last year that it would conduct a safety review of SpaceX and Boeing, the two companies it had hired to fly astronauts to the International Space Station, a top agency official said it would be “pretty invasive,” involving hundreds of interviews with employees at every level of the companies at multiple locations.

Such an in-depth probe of the corporate cultures would be time-consuming and expensive, requiring modifications to the contracts awarded to the companies. Ultimately, NASA agreed to pay SpaceX $5 million for its review, and it proceeded.

Boeing, however, said such a review would require an additional payment of about $25 million, according to a person familiar with the negotiations. NASA balked at the cost and decided that a far more limited paper audit would suffice, along with a few interviews of key personnel, according to four agency and industry officials familiar with the matter.

The Organizational Safety Assessments, as they are officially known, were triggered after Elon Musk, SpaceX’s founder and chief executive, was seen taking a hit of marijuana and a sip of whisky during an interview streamed on the Internet late last year. NASA officials were more concerned about SpaceX, a relative newcomer founded by Musk in 2002, than they were about Boeing, which had worked alongside NASA since the dawn of the Space Age and had been a key partner of the federal government for even longer.

“Boeing didn’t do anything to trigger a deeper dive,” said one official, who like others was not authorized to speak publicly about internal deliberations.

But it remains an open question whether that history will continue to protect Boeing in the wake of recent safety failings, especially the two crashes of Boeing’s 737 Max airplane that killed 346 people. Members of Congress have accused Boeing of prioritizing profits over safety, and multiple reviews of the crashes have led to concerns that the deference federal regulators at the Federal Aviation Administration showed Boeing led to lax oversight that allowed Boeing to cut corners on safety.

Rep. Peter A. DeFazio (D-Ore.), the chairman of the House Transportation Committee, has blasted the company for what he called “a lack of candor with regulators and customers.”

He said the 737 Max issue was “not about one employee; this is about a failure of a safety culture at Boeing in which undue pressure is placed on employees to meet deadlines and ensure profitability at the expense of safety.”

Boeing has defended its relationship with the FAA, while recently acknowledging it must “restore the confidence of our customers and the flying public in Boeing,” according to a senior executive.

Boeing has shown an ability to leverage its relationship with NASA. In 2014, it was awarded a contract worth $4.2 billion to build a spacecraft capable of flying astronauts to and from the space station. (SpaceX’s award was $2.6 billion.) But even though the award was part of a “firm fixed price contract,” Boeing was able to win an additional $287.2 million from the space agency in what a government watchdog recently said were “unnecessary” payments.

NASA “essentially paid Boeing higher prices to address a schedule slippage caused by Boeing’s 13-month delay” in completing a key design milestone, according to a report by NASA’s inspector general. But the IG said the “additional compensation was unnecessary” given that the risk of a gap between flights was “minimal.”

The IG found that Boeing’s cost per seat for launches to the space station would be $90 million, or more than 60 percent higher than SpaceX’s $55 million price.

NASA and Boeing pushed back forcefully against the IG’s conclusion, saying the additional costs were justified and that Boeing was forced to shoulder more of the costs up front.

In a brief interview recently, NASA Administrator Jim Bridenstine said Boeing’s problems with the 737 Max were separate from issues that have arisen in its work for NASA. Boeing, he said, “is a big company. They do a lot of different things. … I don’t want to suggest that the challenges with the 737 Max has implications on” its work for the space program.

But Boeing’s space division is not immune from deficiencies that might affect flight safety. For example, last year propellant leaked during a test of Boeing’s emergency abort system. Boeing determined why the leak had occurred, and the leak did not recur in a subsequent test.

However, earlier this month, another test of the emergency abort system encountered a different problem when only two of the capsule’s three parachutes deployed. The uncrewed capsule made a soft return to Earth with just the two chutes, and NASA and Boeing declared the test a success. But the reason the third parachute didn’t deploy was a human one: Someone had failed to notice that a smaller chute had not been hooked to the larger main chute it was designed to pull out.

Boeing said the lapse hadn’t been spotted because the point at which the two chutes were supposed to be latched together was hidden from view inside a housing.

At the time the safety reviews were announced last year, Musk’s behavior had rankled top NASA officials, who worried about the message Musk’s public alcohol and marijuana consumption would send about how the company would enforce workplace safety and a drug-free environment.

Bridenstine said then that he had “a lot of confidence in the SpaceX team.” But he added that “culture and leadership start at the top. Anything that would result in some questioning the culture of safety, we need to fix immediately.”

“If I see something that’s inappropriate, the key concern to me is what is the culture that led to that in appropriateness, and is NASA involved in that?” he said. “As an agency, we’re not just leading ourselves, but our contractors as well. We need to show the American public that when we put an astronaut in a rocket, they’ll be safe.”

Musk responded to NASA’s concerns by sending an email to SpaceX employees in which he admitted smoking pot “with no skill, obviously” and said that “it was not wise.” He reiterated that while marijuana is legal in California, it is controlled by federal law. “SpaceX maintains a drug free workplace,” he wrote in the email, a copy of which The Washington Post obtained.

“SpaceX personnel may not use or posses any controlled substance while in the workplace, and also may not be under the influence of legal or illegal drugs while at work,” Musk wrote. “Anyone who appears to be inebriated or under the influence while at work is subject to drug testing and potentially other employment actions.”

NASA and SpaceX reached terms on the safety review, which NASA spokesman Josh Finch, in a statement to The Post, called “a comprehensive safety review through individual employee interviews.”

Finch said NASA officials went up and down the company, interviewing all kinds of employees about training, drug policies and safety procedures. The examination was exhaustive, “including senior managers, mid-level management and supervision, and engineers and technicians at multiple sites,” Finch said.

Gwynne Shotwell, SpaceX’s president and chief operating officer, recently told reporters that the review was wrapping up. She said the “results came back very positive.”

“I can tell you, it has gone very well,” she said. “Not that we haven’t learned things, but it’s gone very well.”

She added that the company has an anonymous tip line called “safety net” for employees to report safety concerns.

“I think it makes sense actually to have these reviews. We had never undergone this kind of review before, but we are incredibly focused on safety. When an employee gets hurt at work, morale on the team goes down,” Shotwell said. “Poor safety is horrible business.”

For Boeing, however, the review had a far more limited scope, Finch said: a review of documents to ensure it was enforcing a drug-free workplace “and a limited number of interviews with company personnel.”

Further details about how the SpaceX and Boeing safety reviews differed were not available. NASA declined to make available to The Post copies of the “request for proposal” it had prepared for Boeing or SpaceX laying out the extent of the safety check it originally proposed, calling the RFPs “proprietary.”

It was that proposal that Boeing used to seek the additional $25 million for the review and that NASA declined to pay.

In a statement, Boeing spokesman Todd Blecher said, “We deeply appreciate NASA’s trust in us.”

“NASA has decades of insight into Boeing’s commitment to safety,” the statement said. “NASA therefore had confidence that Boeing’s assessment could be completed with fewer in-person interviews and detailed document requests than seems to be the case for our competitor.”