A power cord slammed by a door caused the brakes on BART’s first new rail car to fail last week, sending the car into a pile of sandbags at the end of a Hayward test track, agency officials said Wednesday.

The rail car, manufactured by Bombardier, a Canadian firm, is undergoing a rigorous series of tests on BART’s test track at the Hayward maintenance yard. Between tests, BART uses it to train its operators how to use it.

During a training session Friday the brakes failed and the car, traveling 6 to 8 mph, plowed into the sandbags. The car did not leave the tracks, contrary to some early reports.

At a Wednesday news briefing, BART officials said the cause of the incident was neither a train equipment failure nor operator error. Instead, said Tamar Allen, chief maintenance and engineering officer, it was caused when a piece of monitoring and testing equipment shorted out, apparently because a power cord was damaged after being struck by a cabinet door that, perhaps repeatedly, slammed open and shut as the train moved and stopped.

“The car did not fail,” Allen said. “The operators did not do anything wrong.”

The short circuit caused the car’s auxiliary power system to shut down, cutting electricity to the pump that feeds hydraulic fluid to the rail car’s friction braking system. Electrical brakes had already slowed the train from 15 mph to about 5 mph, she said, but when the friction brakes failed, the train, heading down an incline, gained speed slightly before slamming into the sandbags.

The car suffered no damage aside from being inundated in sand that needed to be cleaned out of the wheels and off the front of the car, said John Garnham, the project manager for BART’s new car program. No one was injured.

Garnham said the accident wouldn’t have occurred in a longer train, even a two-car train, because the other cars, which are independently powered, would have had working brakes and brought it to a halt.

BART will work with Bombardier engineers, who are on site, to install software that will give train operators better warnings of the lack of hydraulic fluid and automatically cut propulsion power to the car, Garnham said.

BART will also improve its training for operators running single-car trains, which is done mainly in rail yards. And they’ll remove the door from the power cabinet so it will no longer fray the cord.

Garnham and Allen said the reason BART tests the new rail cars, especially the initial car, so extensively is to find problems and fix them before the agency gives Bombardier approval to crank up the production line.

“When you’re testing a new vehicle, stuff happens,” Allen said. “What you do when stuff happens is you learn things and you make improvements you wouldn’t have thought of in the first place.”

She said the car will resume regular testing soon. It’s the first of 775 new cars BART has ordered. Another nine are due before the end of the year, but they’ll be restricted to test tracks or after-hours runs for at least six months.

Once the first 10 cars pass their tests, Bombardier will start assembling the cars in bulk in Plattsburgh, N.Y., and shipping them by truck to the Bay Area. Sixty new cars are expected to hit the rails in 2017, with the full order of 775 expected by 2021. BART is spending $2.5 billion to replace and expand its aging fleet of 664 cars. The agency hopes to find funding to expand that order to 1,081 cars.

Michael Cabanatuan is a San Francisco Chronicle staff writer. Email: mcabanatuan@sfchronicle.com Twitter: @ctuan