Firefighters responded to the blaze at Regency Plaza Apartments at 600 J St. at 12:44 a.m. Sunday and controlled the fire at 4:29 a.m., according to a Contra Costa fire dispatcher.
Two people had to be rescued from their balconies and were taken to the hospital to be treated for smoke inhalation, Contra Costa fire Battalion Chief Keith Cormier said.
One was released and the other is in stable condition.
The fire damaged about 30 units in a 54-unit building, and the Red Cross and the city of Martinez helped evacuate residents, Cormier said.
Residents were taken to an adult learning center for the night, and many will be able to return to their apartments to assess the damage Sunday.
The fire was caused by an oven that was left unattended, Cormier said.
Damage estimates were not available.
About 60 people responded to the fire, including firefighters from Hercules, Benicia and San Ramon.