The Alameda County Coroner's Office identified one of the victims as 64-year-old Edwarn Anderson, of Oakland.

"I just heard screaming and breaking glass, sounds of wood breaking and explosions," resident Kirstin Evans said. "I looked at my window and it was all orange and yellow. I ran out of my apartment and it was all smoky and debris was all over the place."

Evans told NBC Bay Area that the fire may have been caused by a burning candle in a residence on the second floor of the building.

RAW: Firefighters Battle Raging Flames in Oakland

Heavy flames and smoke spew from a building in Oakland.

(Published Monday, March 27, 2017)

Seven people were pulled from the burning building, which is believed to house more than 80 people, according to Oakland Fire Department Battalion Chief Eric Logan. Several people were hanging out of windows when first responders arrived, fire officials said.

Resident Tarub Smith grabbed her girls at about 5:40 Monday morning and got out before the three-story building collapsed.

The fire broke out in the rundown neighborhood nearly four months after a warehouse called the Ghost Ship, only about five miles away from Monday's blaze, caught fire and killed 36 people attending an unlicensed concert.

The fires have raised questions about the use of some buildings in the city for residences amid a shortage of affordable housing in the San Francisco Bay Area.

In 2010, Oakland allowed the owner of the 40-unit building that burned Monday to convert the structure into transitional housing for recovering drug addicts, people struggling with homelessness and others, records show.

Since then, it has been the subject of several building department citations and investigations.

City Knew About Unsafe Conditions at Building That Caught Fire: Records

The NBC Bay Area Investigative Unit has been looking into the history of the building that caught fire Monday morning and found the City of Oakland knew about some unsafe and unsanitary conditions at the property. Investigative Reporter Liz Wagner reports.

(Published Monday, March 27, 2017)

City records show the building had more than 20 code violations dating back 17 years. The code violations ranged from mold to electrical issues, according to city records.

The owner, Keith Kim, was sent a notice of violation on March 2 over complaints of large amounts of trash and debris, building materials and furniture behind the property.

During a Friday inspection, just days before the fire, officials found the building lacked fire extinguishers, smoke detectors in every apartment and a working fire sprinkler system, among other violations, documents released by the city of Oakland show. Inspectors ordered the owner to immediately service the fire alarm and fire sprinkler systems.

The building department also has an open investigation into complaints of "no working heat throughout the building, electrical issues and a large pest infestation," city records show.

The Oakland Fire Department did not respond Monday to a request for inspection records involving the building, and Kim did not return telephone calls from The Associated Press.

Days after the December fire, the owner of the building that burned Monday sent an eviction notice to Urojas Community Center, which had leased and occupied the first two floors of the three-story building, said James Cook, an attorney for the center.

The community center assists about 60 people with transitional housing and services, Cook said. He had complained to the city about clogged toilets and disgusting bathrooms, exposed wires and water an inch deep on the ground floor, he said.

"The landlord was using the Ghost Ship fire as a reason to evict them," Cook said. "And it's suddenly convenient that the building is now on fire. It's like Ghost Ship, but worse."

Several residents said they discounted the initial commotion over the fire because the building and neighborhood are noisy. Loud arguments occur frequently, and some residents stayed up late, drinking and partying.

Kirsten Evans, 52, said she paid $1,100 a month for a small studio apartment without a kitchen. She said she moved in three years ago after she was evicted from her apartment of 20 years because her landlord wanted to raise her rent dramatically.

She said she woke up briefly Monday to take her medication and heard yelling and screaming. Then she heard windows popping, shattering from the heat and a skylight overhead shattering and glass falling outside her door.

As she fled, Evans said she trampled over broken glass as wires and light fixtures sparked red and white.

Awakened by screams of "fire," Michael Jones bolted out of bed in the pre-dawn darkness Monday at the dilapidated Oakland apartment building he calls home, instinctively pounded on the doors of his elderly neighbors and ushered them to safety — walkers and all.

Jones, 43, then found Princess, the "house" pit bull, cowering in the backyard, and the two ran out the front door as glass shattered from the heat.

A few hours later, he and the dog stood across the street, staring at the smoldering wooden structure that housed some 80 low-income residents, many of whom complained that they had not heard alarms, felt sprinklers or found fire extinguishers as they fled the substandard living conditions.

Jones said a prayer of gratitude for surviving the fire that killed three people and hurt three others, including two children. One person remained unaccounted for as of Monday evening.

"At least the rats are gone," said Angela Taylor, 62, clutching her purse, the only possession she managed to get out of a room she paid $550 a month to live in. "It's the wrong purse, but it's better than nothing. A lady needs her purse."

Bobby Earl Bishop, Jr. was sleeping on the first floor when he heard one of his neighbors yell, "Fire!" He initially thought it was a joke until he recognized the smell of smoke. Bishop and his wife managed to escape the inferno with just minutes to spare.

"I'm doing OK," Bishop said. "I'm mad I just lost my place. Me and my wife just lost everything. We only had a little bit of stuff, and we lost everything."

During their initial search and rescue efforts, firefighters reported seeing a person on the third floor of the building, but they were unable to reach the person due to heavy flames and smoke, Logan said. Fire officials later confirmed that one body was located.

Firefighters were quickly pulled from the structure for safety concerns, forcing them to battle the flames from the ground and via extended ladders, according to fire officials.

Roughly one hour after the blaze ignited, crews appeared to gain an upper hand in the fight. Large clusters of flames were replaced by billowing plumes of white smoke. Firefighters also managed to contain the flames to the structure involved.

She claimed the building was infested with bed bugs, rats and cockroaches. Fellow resident Darlene Jones added that the building only had one way in and out — a staircase in the front of the building with a metal gate.

Randall and Jones, along with resident Justin Wash, also claimed that the fire sprinklers in the building did not go off during the fire.

"I don't know how this building came up to code," Wash said.

The Red Cross and the Salvation Army were helping as many as 80 people with meals and a place to sleep Monday night.

Home Fire Relief: Anyone who would like to make a monetary donation to help victims in Monday's fire should contact the Red Cross at RedCross.org. Check the option "Home Fire Relief" and note in the comments that your gift is earmarked for services to support families impacted by the 2551 San Pablo Ave./Mead Ave. fire in Oakland, CA.

NBC Bay Area's Jean Elle and the Associated Press contributed to this report.