Escape routes were locked or blocked and smoke alarms couldn’t be heard as a four-alarm blaze raced through a Mission District building, killing one person and injuring six, residents said Thursday.

“I thought I was going to die with my daughter,” said Marcela Cordova, 39, recalling her failed attempt to reach a fire escape through a third-floor window as the flames closed in Wednesday night. Bars on the glass wouldn’t budge, she said.

“It was the scariest thing,” said Cordova, whose screams finally attracted the attention of firefighters battling the blaze in the three-story building at 22nd and Mission streets. They escorted her and her 17-year-old daughter to safety.

The fire, which began about 6:45 p.m. in the commercial-residential building, left 54 people without homes, including nine children. About 15 small businesses on the ground floor, including a Popeyes restaurant, as well as a dozen offices on the second floor were damaged.

Searching for a cause

The dead person’s name has not been released, but residents and the building’s owner said he was a man who lived on the third floor. The injured, who included a firefighter, suffered smoke inhalation and burns, authorities said. None of the injuries was life-threatening.

Authorities said they do not suspect arson but have not established a cause of the fire. The building’s owner, Hawk Ling Lou, said he had heard from residents that it may have started in a microwave oven.

Fire Chief Joanne Hayes-White, who toured the site with Mayor Ed Lee, said it will take days or weeks to confirm the cause. She also said investigators would be looking at whether “protection systems were in good working order.”

Fire Department spokeswoman Mindy Talmadge said several residents reported trouble getting out of the building. Some, such as Cordova, said bars on windows blocked their path out. Others said the staircases on outside fire escapes were locked, Talmadge said.

A preliminary inspection showed that every unit checked by firefighters had at least one window from which bars could be removed, but the review was not complete, Talmadge said. Firefighters rescued seven people off the escapes, she said, meaning residents who reached the collapsible stairs may have had problems unrolling them.

No outstanding violations

Other residents said the building’s fire alarms hadn’t sounded, Talmadge said. The building has a hard-wired alarm system, maintained by the owner, that is supposed to go off when a fire is detected.

Investigators are looking into the reports, Talmadge said. Five people had been rescued from the building in addition to those pulled from the fire escapes, she said, and it is “unusual for a fire at that time of day to have so many people trapped.”

Lou, the owner, said the reports of inaccessible fire escapes and inaudible fire alarms were inaccurate.

“Everything on the building is up to code,” he said.

Damage in the millions

A registered contractor had certified at some point within the past year that the fire alarms and fire extinguishers were working, Talmadge said. City records show the building has no outstanding violations or complaints.

Lou said he is fully insured and will rebuild as quickly as possible.

“I really feel sorry for the tenants,” he said. “It’s probably going to take a long time to get it rebuilt.”

Fire officials estimated the damage at $4 million to the building and $4.5 million to its contents. An adjacent building suffered $100,000 in structural damage and $15,000 damage to contents.

Lou bought the 108-year-old building on Mission Street in 2011. He owns about a half-dozen other properties in San Francisco, according to Jennifer Raike of Old Republic Title Co.

Alessandro Gonzalez, 13, who was home alone when the fire started, was among those who struggled to get out.

He said he heard screaming outside his third-floor apartment — but no fire alarm — and called police, who told him the building was on fire and to get out.

“I opened the door, and smoke came through inside the house, and I couldn’t see nothing,” he said. “It was dark, dark.”

Alessandro smashed a window to get onto a fire escape with his his dog, a mixed shih tzu-miniature poodle. He was able to find stairs on the escape to get to the second floor but not to the ground floor, prompting him to jump into the arms of firefighters.

His mother, Mayra Gonzalez, 36, had returned home and was standing worriedly nearby.

“Thank God he gave my son strength so he could get out,” she said in Spanish, as translated by her son.

Ricardo Cedeno, who returned to the scene Thursday to gaze up at his charred one-bedroom apartment, said the building he called home for 12 years was riddled with safety issues.

Fast blaze, response

About a year ago, the owner put locks on the hallway fire escapes, he said, because vandals were using them to access the roof and spray graffiti. Cedeno added that his apartment had one smoke detector but that it didn’t work.

“My mother cooked a lot, and smoke used to just travel through the apartment,” he said. “One time, she was cooking some beans and forgot about them. Even then, the detector didn't go off.”

But the family liked the apartment because the rent was cheap — $1,175 for a space shared by six people. They also liked it because the neighbors were family, Cedeno said.

“We had to stay,” he said. “We could barely afford it here. Now we might have to move on to another city.”

Firefighters were on scene within three minutes of when the fire was reported Wednesday, officials said. The blaze moved quickly into the attic, complicating efforts to fight it. Smoke poured across the city for much of the night.

Araceli Tolama, 31, said through tears Thursday that she and her 13-year-old son and 10-year-old daughter are now homeless. They had been living in a third-floor apartment for five years.

Tolama said she was less worried about the items they lost and more concerned about where they would live. The spent the night at a hotel after the Red Cross gave them a voucher, good for three nights.

“What will happen now?” she asked.