Flames briefly spread to scaffolding at another building under construction, Maguire said.
The fire was fueled by wooden frames and other materials at the site, Hayes-White said. Because it was under construction, the building had no fire-suppression systems.
"Our objective last night, which we were able to achieve, was to contain (the fire) to the building of origin," she said.
Fire officials did not yet have a damage estimate but said the entire six-story building was a loss.
By late afternoon Wednesday, construction crews were using an excavator to tear down the structure on one end while firefighters on the other end doused hotspots.
Firefighters will likely remain on the scene throughout the night to make sure the fire doesn't rekindle, Richardson said.
Meanwhile, residents of the Strata apartment building were allowed back into their homes Wednesday evening.
Exterior sprinklers on the building had to be replaced and the fire protection system restored before residents could be allowed back in, fire Deputy Chief of Operations Mark Gonzales said. About 30 units suffered damage, fire officials said.
Earlier Wednesday, Eli Brill and his wife Justyn Bellsey, both 31, temporarily returned to their apartment at Strata to retrieve belongings. Firefighters had helped them retrieve their dog the previous night.
"It was really scary," Bellsey said. "I'm just relieved that we were able to get in."
The burned building was part of a residential development project with 172 units, according to BRE Properties, the building's owner.
It was going up in a former industrial area that became a redevelopment district in the 1990s and has since attracted a mix of high-end residential housing and retail businesses.
A new University of California, San Francisco hospital is also being built.
Associated Press writer Channing Joseph contributed to this report.