DANIA BEACH — A Broward Sheriff’s Office deputy shot two dogs as they charged at the fire marshal investigating a massive blaze at a truck repair shop early Friday morning, officials say.

The dogs survived the shooting.

The fire broke out a little after 4 a.m. in the area of the parking lot of T&M Truck and Trailer in the 2400 block of Southwest 32nd Street in Dania Beach, Broward Fire Rescue Battalion Chief Michael Kane said in a media release.

Over 40 firefighters responded to find multiple tractor trailers on fire between two businesses, Kane said. Five commercial vehicles, mostly trucks and trailers, were fully engulfed.

It took the firefighters over an hour to extinguish the fire, which was hot, intense, and “extraordinarily difficult” to contain, Kane said, because of the heavy load of diesel fuel in the trucks and the confinement between the two buildings. One of the businesses was in constant threat of catching fire, but firefighters were able to put out the blaze before that happened.

A state fire marshal arrived to investigate the fire, Kane said, which is typical of fires that are either suspicious in nature or have an unknown cause.

After firefighters had left the scene, a person in a vehicle with two pitbulls inside pulled over to a nearby building, according to Claudinne Caro, a spokesperson for the Broward Sheriff’s Office. The dogs ran out of the car and charged at the fire marshal and a BSO deputy, who was assisting at the scene.

The deputy shot both dogs “in self-defense,” Caro said in an email.

Deputies transported the dogs to Broward County Animal Care for treatment, and both dogs are alive. Caro did not say who was driving the vehicle or why they pulled over at the fire scene.

Eugene Dyadchenko, a supervisor at T&M Truck and Trailer, said that the fire occurred in a neighboring parking lot owned by the company next to theirs, and their trailer trucks emerged unscathed.

“It looked like it was on our parking lot, but it wasn’t ours at all,” he said. “No vehicles were damaged.”

The address of the company provided by Dyadchenko doesn’t come up on an internet search, but a Google Maps picture shows a sign for the Archer Western-de Moya Group’s Interstate 95 project outside of a fenced parking lot with excavators and mounds of materials.

The Florida Department of Transportation, which contracts with the Archer Western-de Moya Group, owns property nearby, according to the Broward Property Appraiser’s Office. But spokespeople for FDOT said that the fire occurred on the lot behind theirs, not their own lot, though they didn’t know what company owns the lot.

One of the firefighters was hospitalized with a minor back injury, Kane said. No one else was injured.

The fire marshal is investigating the cause of the fire.