This browser does not support the Video element.
OAKLEY, Calif. - A very scary near miss for fire crews fighting an Oakley tire store fire this morning when they were almost struck by a train.
Fire officials say the called and confirmed twice that the railroad tracks were shut down Wednesday morning so they could tackle a two-alarm fire on Main Street.
WATCH: Train comes too close to firefighters
But a KTVU photographer's personal dashboard camera caught the train coming through and firefighters running to get out of the way.
Six firefighters raced to get hoses off the tracks and run out of the way in less than five seconds.
“The train come through unexpectedly,” said Battalion Chief Rich Sonsteng. “It was a near miss, moments away from being struck by the train.”
East Contra Costa County fire officials say they’re opening an investigation into a near miss accident. BNSF Train spokeswoman Lena Kent said the "incident is under investigation."
Crews were on scene fighting a two-alarm blaze that started at 2:20 a.m. on Main Street in Oakley at Saeed Bro Tires, but then spread to others – a total of four were impacted.
East Contra Costa County Fire crews initially arrived at a one-alarm fire dispatch, but the fire was later upgraded to a two-alarm.
When the first units arrived, they had "heavy involvement on the right side of building with a partial roof collapse," Battalion Chief Ross Macumper said. "A second alarm was requested. When we started putting bodies with water on scene, we started getting a good knock down where we are at this point.”
The fire appeared to have started outside of the fire store and was called in by drivers on Main Street, but it spread into the tire store and to neighboring businesses in the complex. It also temporarily stopped trains running on tracks behind the shop.
Main Street will be shut down for a few hours, which which could impact rush hour traffic heading to Highway 4.