Two veteran Los Angeles County sheriff’s deputies were seriously hurt Tuesday when a fire broke out inside a trailer serving as a mobile shooting range north of Los Angeles, authorities said.

The deputies were listed in critical but stable condition after being burned in the approximately 50-foot trailer, prompting Sheriff Robert Luna to close other mobile ranges countywide as investigators look into what caused the blaze.

"We need to know why it happened and get to the bottom of it so we prevent it from happening again," Luna said during a news conference at the Henry Mayo Newhall Hospital, where the deputies were initially treated. They were later transferred to LA General Medical center for further treatment.

SUIT ALLEGES GAS LEAK AT PENNSYLVANIA CHOCOLATE FACTORY WENT IGNORED BEFORE EXPLOSION

Luna did not immediately release the names of the deputies. He said one has been with the department for 21 years and the other has 17 years of service.

Crews fought the fire for more than four hours, beginning around 9:30 a.m., and were still working to extinguish it as of late afternoon, according to a sheriff’s department statement.

calfiornia authorities block road

The California Highway Patrol and sheriffs block off a road leading to Pitchess Detention Center in Castaic, California, where a fire erupted at a shooting range on Oct. 10, 2023.   (David Crane/The Orange County Register via AP)

They were challenged by live ammunition still inside the trailer that posed "extreme danger," Luna said.

The shooting range is located on a sprawling campus in Castaic, a community roughly 35 miles northwest of downtown Los Angeles. The campus also houses the Pitchess Detention Center, a county jail that was placed on lockdown as a precaution. No incarcerated people were threatened by the flames, the sheriff said.

CLICK HERE TO GET THE FOX NEWS APP

The trailer had two "firing lanes" inside and one of the deputies was participating in firearms qualification, which the department requires deputies to do once a quarter, Luna said.

The fire department initially said it had received reports that four deputies were injured, though Luna later confirmed only two deputies were hurt.