Richard Branson’s Virgin Galactic had just had its second successful flight to the edge of space, a daring mission that it said put it one step closer to finally flying tourists and making it the “world’s first commercial spaceline.”

But when the ground crew wheeled the suborbital spacecraft back into the hangar, company officials discovered that a seal running along a stabilizer on the wing designed to keep the space plane flying straight had come undone — a potentially serious safety hazard.

“The structural integrity of the entire stabilizer was compromised,” Todd Ericson, a test pilot who also served as a vice president for safety and test, said, according to a soon-to-be-published book. “I don’t know how we didn’t lose the vehicle and kill three people.”

This previously unreported account of the flight in February 2019 is contained in “Test Gods: Virgin Galactic and the Making of a Modern Astronaut” by New Yorker magazine journalist Nicholas Schmidle, who spent almost four years embedded with the company. The book’s publisher, Henry Holt and Co., sent an advance copy to The Washington Post. The book is scheduled for release May 4.

The damage to the seal is a reminder of the perils inherent to human spaceflight, an endeavor long dominated by governments but now being taken over by private companies racing to lure paying customers and investors. The transition has been, at times, tumultuous, as private companies suffer failures with potentially serious consequences but don’t always report them publicly.

And the regulations governing private space companies are relatively loose — the Federal Aviation Administration ensures the safety of people and property on the ground, but there is merely an “informed consent” standard for the passengers, who need only acknowledge the risks as if they were skydiving or bungee jumping.

In the book, Schmidle wrote that the “seal had disbonded on the way up, as the pressure increased with nowhere to vent,” ultimately leaving a “wide gap running along the trailing edge of the right h-stab,” or horizontal stabilizer. When Mike Moses, Virgin Galactic’s president, missions and safety, saw the gap, “he felt his stomach drop,” Schmidle reported. Moses’s wife, Beth Moses, Virgin’s chief astronaut instructor, had been on the flight.

After the flight, the company hired an outside aviation expert, Dennis O’Donoghue, to conduct a safety review of the program, and he spent weeks interviewing company officials and poring over records, according to the book. After a month, O’Donoghue, who had served as a test pilot in the Marine Corps and at NASA and also had worked at Boeing, submitted his report. The company, which has signed up more than 600 people for flights that cost as much as $250,000, has refused to make it public.

Virgin Galactic “tried to keep the h-stab problem quiet, worried that it might spook customers,” Schmidle wrote. That stance concerned Ericson, a former military test pilot who had served as the safety chief at the Air Force Test Flight Center before coming to Virgin Galactic in December 2014, according to his LinkedIn profile.

“This should have been a Come-to-Jesus Moment, not the kind of thing you brush under the rug,” Ericson said, according to the book. Ericson informed the company in June 2019 that he was stepping down as vice president of safety, which concerned George Whitesides, then the company’s CEO, who Schmidle wrote was suddenly faced with the prospect that “his vice president of safety was resigning because he’d lost confidence in the safety regime.”

Ericson filled a different position at the company, vice president of special projects, until October 2020.

In an interview Monday, Moses, the Virgin Galactic president, said that while the company did “discover physical damage” to the stabilizer, there “was no noticeable effect in flight with the pilots or mission control. No one noticed that issue in real time. There was no impact on the flying qualities.”

He said the problem occurred when thermal protection coating was applied incorrectly and ended up blocking vents intended to allow air inside the stabilizer to escape as the atmospheric pressure decreased outside the craft as it flew higher.

“The design of the h-stab wasn’t really an issue there,” Moses said. “It was an error that occurred in processing on the ground. Clearly a problem, right? Not something that should be allowed to happen and something we clearly needed to address.”

The company had already started implementing an updated design on the stabilizer for its second spaceship, he said. And the fact that the spacecraft performed well during the 2019 flight despite traveling faster than the speed of sound to space and back “clearly showed some of the resilience of the structure, that it held together.”

He added that the company immediately notified board members and shareholders as well as the FAA and “kept them apprised regularly of what we were finding, as well as the corrective actions.”

At the moment the problem was discovered the teams were concerned, even emotional. “The reaction is, ‘Wow, what was that? How could that happen?’” he said. But investigating the issue and finding the problem “gives us pretty high confidence in our design and our performance on the changes we made since,” he said.

In 2014, Virgin Galactic’s space plane, known as SpaceShipTwo, came apart, killing one of the pilots during a test flight, after he prematurely unlocked the system designed to reorient the spacecraft and position it to reenter Earth’s atmosphere. The National Transportation Safety Board found that Scaled Composites, the company hired by Virgin to build and test the vehicle, failed to properly train its pilots and did not implement basic safeguards to prevent the human error that caused the death.

After the crash, Virgin Galactic took over manufacturing and testing itself. It has repeatedly vowed that it was thoroughly testing its vehicle and would not fly until it was safe.

But after the 2019 flight, Schmidle reported that Ericson “had concluded that members of the maintenance team were ‘pencil whipping’ inspections — signing for inspections that were not conducted properly.” The inspectors, Schmidle wrote, not only failed to notice that the vents were blocked, causing the seal on the stabilizer to rupture, “but also missed a bag of screws taped to the inside of the h-stab.”

He recommended firing the head of maintenance, but Moses refused.

After the February 2019 flight, Virgin Galactic grounded the vehicle and began redesigning the stabilizer and hired a contractor to “build a new one from scratch, out of metal,” Schmidle reported, instead of the composite carbon fiber used previously.

Unlike traditional rockets that take off vertically from a launchpad, Virgin Galactic launches its spacecraft from a mother ship, which carries the spacecraft to an altitude of more than 40,000 feet. The spaceship is released, the pilots fire the motor and it shoots off to the edge of space before gliding back to Earth.

The company first passed the 50-mile edge-of-space threshold in December 2018 with two test pilots. It repeated the feat in February 2019, this time with Beth Moses aboard.

Since the investigation, the company has flown two glide flights after it moved its operations from Mojave, Calif., to Spaceport America, the taxpayer-funded facility built for the company in New Mexico.

Last month, it attempted what was supposed to be a powered test flight to space. But the flight was aborted after the onboard computer that monitors the propulsion system lost connection. That halted the ignition of the motor, and the pilots safely glided the spaceship back to the runway.

On Monday, the company announced that its next test flight could come as early as Feb. 13. The test objectives include “assessing the upgraded horizontal stabilizers and flight controls during the boost phase of the flight,” the company said in a statement.

While the company hopes to fly paying customers to space this year, it is still in the test phase of its program, Moses said, a time to discover and fix problems.

“We thoroughly inspect the vehicle, updating our analysis; we update and critique our performance and make sure we’re happy with the results before we go to those next flights,” he said. “We take our time and make sure things are right.”