CAPE CANAVERAL, Fla. — NASA decided Saturday that it’s too risky to bring two astronauts back to Earth in Boeing’s troubled new capsule, and they’ll have to wait until next year for a ride home with SpaceX. What should have been a weeklong test flight for the pair will now last more than eight months.

The seasoned pilots have been stuck at the International Space Station since the beginning of June. A cascade of vexing thruster failures and helium leaks in the new capsule marred their trip to the space station, and they ended up in a holding pattern as engineers conducted tests and debated what to do about the trip back.

After almost three months, the decision finally came down from NASA’s highest ranks Saturday.

Butch Wilmore and Suni Williams will come back in a SpaceX spacecraft in February. Their empty Starliner capsule will undock in early September and attempt to return on autopilot and touch down in the New Mexico desert. As Starliner’s test pilots, the pair should have overseen this critical last leg of the journey.

“A test flight by nature is neither safe nor routine,” said NASA Administrator Bill Nelson. “And so the decision ... is a commitment to safety.”

“This has not been an easy decision, but it is absolutely the right one,” added Jim Free, NASA’s associate administrator.

It was a blow to Boeing, adding to the safety concerns plaguing the company on its airplane side. Boeing had counted on Starliner’s first crew trip to revive the troubled program after years of delays and ballooning costs. The company had insisted Starliner was safe based on all the recent thruster tests both in space and on the ground.

Boeing did not participate in Saturday’s news conference by NASA but released a statement: “Boeing continues to focus, first and foremost, on the safety of the crew and spacecraft.”

Rand Corp.’s Jan Osburg, a senior engineer who specializes in aerospace and defense, said NASA made the right choice “but the U.S. is still left with egg on its face due to the Starliner design issues that should have been caught earlier.”

NASA’s Norm Knight said he talked to the astronauts Saturday and they support the decision to delay their return.

Despite Saturday’s decision, NASA isn’t giving up on Boeing. Nelson said he is “100%” certain that Starliner will fly again.

NASA went into its commercial crew program a decade ago wanting two competing U.S. companies ferrying astronauts in the post-shuttle era. Boeing won the bigger contract, more than $4 billion, compared with SpaceX’s $2.6 billion.

With station supply runs already under its belt, in 2020 SpaceX aced the first of what have since amounted to nine astronaut flights, while Boeing got bogged down in design flaws that set the company back more than $1 billion. NASA officials still hold out hope that Starliner’s problems can be corrected in time for another crew flight in another year or so.