SAN FRANCISCO — BART’s new train cars failed a key safety inspection on Friday, raising questions about whether commuters will be riding the new train by Thanksgiving, the transit agency’s latest target for rolling out the first cars in its new fleet.

BART is replacing its 669 train cars with 775 new ones, a $2.6 billion project to update its aging fleet with more reliable cars, add capacity throughout the system and improve passengers’ experience. The effort has been fraught with delays since the start, frustrating passengers eager to see the new cars come online.

For years, San Ramon resident Jennifer Jones commuted on BART nearly every day but started looking for alternatives last year when she got fed up with riding on crowded, dirty trains, she said.

“I get on at the second stop and the train is packed like sardines going into San Francisco,” she said. “And then add in gross trains that are always packed (and) disgusting BART stations. It’s like an unsafe cesspool.”

In a letter sent to BART on Monday, staff from the California Public Utilities Commission (CPUC), which regulates transit operators across the state, said BART can’t use the new cars until it corrects the problems uncovered during a Nov. 3 inspection, according to the letter obtained by the Bay Area News Group.

Inspectors from the state regulatory agency said the 10-car train failed to recognize all the cars in the line-up, instead recognizing only three of the cars on the train. At the same time, the train operator was unable to open the doors at platform stops, Elizaveta Malashenko, the director of the CPUC’s Safety and Enforcement Division, said in her letter to BART’s general manager.

“Please diagnose the issue and provide a detailed written explanation to the CPUC staff regarding the cause of the failure and how it has been corrected,” Malashenko wrote. “After the corrections have been made, another test run will be required for CPUC staff observation.”

The doors didn’t open on seven of the cars in the 10-car train, said Jim Allison, a BART spokesman.

But, so far, he said it’s unclear what caused the glitch. BART engineers and staff from the train manufacturer, Bombardier, Inc., are working to identify the problem, Allison said. That will help determine whether the trains can run around Thanksgiving, he said.

BART submitted its final set of safety certification documents to the commission on Oct. 30, and were waiting on the CPUC to give BART its final green light, a process Allison said typically takes up to 21 days. Once BART fixes the glitch, staff from the CPUC will run another test, running the new train throughout the entire system, including stops at all 46 station platforms.

It’s too early to tell what exactly this will mean for commuters, said Rebecca Saltzman, president of BART’s governing board. Whether the problem causes a short delay or a long delay will be up to staff to determine, but Saltzman said it’s better to have all the kinks worked out before more train cars start coming online, and she urged passengers to remain patient.

“We’re really close,” she said. “We don’t know the exact date, but we’re really close to having these first ten train cars in service and once (that happens), the rest of the train cars should come online quite a bit quicker.”

“People should start to see many of them running next year, and it should have a big impact,” she said.

The latest snag is one of many to dog BART’s rollout of its new fleet. Problems with a critical power supply system on the trains plagued the cars’ design early on, and then testing hiccups further slowed the train cars’ rollout. BART had hoped to get its first production vehicle, or train cars that have already incorporated changes identified during testing, in December last year but didn’t start getting them until last month.

That’s pretty normal for any transit agency hoping to integrate a new fleet into an old system, said Randy Clarke, the vice president for operations and member services at the American Public Transportation Association. He used to work for the Massachusetts Bay Transportation Authority in Boston, where part of his job involved overseeing the procurement of new train cars for their system. It’s never a simple process to bring new train cars online, he said.

“It’s not just that I have my railroad, and it runs in a certain way, and I can just put new trains on there like a Lego set,” he said. “It’s an integrated system, and almost everyone who gets new vehicles … has some issues.”

Often, Clark said transit agencies will have delays during the design and testing phases and then make up lost time during production.

BART is hoping to do just that. Agency officials have said in the past they’ll still be able to meet a 2021 target for replacing the entire fleet by ramping up production. It needs a certain number of new cars running by the time the new Berryessa station in the South Bay opens, projected for mid-2018, in order to maintain its current level of service.