MOUNTAIN VIEW (CBS SF) — A coffee roaster ignited a garage fire early Wednesday that quickly spread into a unit of a Mountain View four-plex, heavily damaging the building before it was brought under control.

Mountain View Fire Chief Juan Diaz said the garage was full engulfed when firefighters arrived at the scene at 8:30 a.m. in the 400 block of Mountain Laurel Court.

“We took an aggressive attack and were able to stop of the fire from spreading (to the other units) in the attic,” said Diaz, who added that firefighters were able to arrive at the scene just two minutes after getting the call.

At 8:51 a.m., fire officials called in a second alarm to fight the heavy fire in the attic and the collapsing roof.

“Our guys took a beating but saved the building,” Mountain View fire officials said in a statement.

A resident inside the home and several neighbors were safely evacuated.

Diaz said the homeowner had told firefighters that they were roasting coffee in the garage.

“The roaster had caught fire,” Diaz said. “But the cause is still under investigation.”