Fire crews were summoned around 10:20 p.m. to a duplex in the 1500 block of Thrush Avenue. First responders saw flames shooting out of the building's roof and burning along the side of the duplex, Battalion Chief John Walsh said.
Alameda County Sheriff's deputies rescued a one-year-old boy and a 20-year-old woman who were inside the duplex when the fire broke out. Both were taken to Eden Medical Center in Castro Valley to be treated for smoke inhalation, the battalion chief said.
Emergency responders also rescued two dogs from the building, including one that had to be resuscitated.
The fire displaced a total of five or six residents, most of whom were not at home during the blaze, Walsh said.
Firefighters extinguished the blaze, which appears to have started in a garbage can outside the duplex and spread to the attic.
The battalion chief said the fire caused an estimated $100,000 of damage to the duplex. The cause of the blaze, which appears to be accidental, is under investigation.