A four-alarm fire in San Bernardino burned multiple buildings and a pallet yard on Saturday afternoon, according to the San Bernardino County Fire Department.

The blaze began as a pallet fire at Central and Lugo avenues, but “significant ember cast” caused spot fires and threatened multiple city blocks.

The fire burned with extreme heat as it tore through the pallets, forcing firefighters to battle the flames from a distance as they tried to keep the fire contained to the pallet yard.

But embers carried by wind caused the fire to extend beyond the yard as it ignited several nearby buildings.

The area near the fire was evacuated as more than 70 firefighters worked through extreme heat and gusty winds with multiple downed power lines near the blaze.

Throughout the four-hour firefight, heavy machinery was used to dismantle and move pallets. The fire was finally knocked down just before 10:15 p.m., the Fire Department tweeted.

Crews remained on scene throughout the night to monitor for hot spots and extinguish any residual flames. Firefighters were expected to be on scene Sunday as well, the Fire Department said.

In total, the fire destroyed three structures and damaged two others, but crews were successful in keeping the fire from spreading to large housing units, businesses and nearby vegetation.

There is currently no financial estimate for the amount of damage caused by the blaze.

One firefighter suffered a minor injury and was treated at the scene.

The cause of the fire is under investigation by the Fire Department and the San Bernardino Police Department.