More than 50 firefighters battled flames at a vacant warehouse in National City early Thursday before putting out the blaze, leaving the building in danger of collapse, a fire official said.

The fire was reported around 4:45 a.m. near the intersection of East Third Street and National City Boulevard involving a “concrete tilt warehouse-type building,” said National City Fire Battalion Chief James Stiles.

When he arrived, Stiles said he saw heavy smoke and could tell there was a well-involved fire inside the structure. He said firefighters have been to the same location several times for fires believed to have been ignited by transients.

“We all knew when we got that address at that time of the morning it was going to be a big fire, and it definitely proved that,” Stiles said. He said the building has been vacant for at least the past 1½ years.

Once firefighters began opening doors to check for occupants, the fire “accelerated very rapidly,” sending a huge plume of smoke into the air easily seen from nearby Interstate 5, he said.

At one point, the roof became fully engulfed in flames, and crews took a defensive stance and fought the fire from the exterior. Four aerial water towers were brought in to shoot water on the building.

Fire officials called for a second alarm, which brought firefighters from San Diego, Chula Vista and Coronado to assist. It took about two hours for them to get the blaze under control, he said.

One crew remained on the scene to ensure the fire was completely extinguished, and fire investigators were working to determine the cause. A damage estimate wasn’t immediately available.

“There is high collapse potential right now because the entire roof burned through and two of the walls are compromised,” Stiles said. He said city code enforcement and building department representatives also would inspect the site.

Stiles said the building was slated to be demolished and reconstructed to be used as a school site.