At 6:38 a.m., the fire department received a report of smoke at a two-story building at 22354 Mission Blvd. that houses El Taquito restaurant on the ground floor and apartments on the second floor, Hayward fire Capt. Thor Poulsen said.
The blaze started in the restaurant's kitchen, and by the time crews arrived it had spread up the flue to an upstairs apartment, Poulsen said.
The five people who were inside the apartment at the time managed to get out safely, he said.
"They were awakened by the smoke detector," Poulsen said. "They evacuated immediately. That saved their lives."
The American Red Cross is assisting the displaced residents.
The one-alarm fire caused $80,000 in damage to the apartment, which is considered a "total loss," Poulsen said.
Damage to the restaurant's kitchen was estimated at up to $25,000, he said. The restaurant, which Poulsen said is a "local hangout" that has been around for decades, will be closed for at least a few days, he said.
The cause of the fire remains under investigation, but Poulsen said it appears to have been accidental. He said the blaze highlights the importance of having working smoke detectors in a home.
Several lanes on Mission Boulevard were blocked this morning while crews responded to the fire.