SAN FRANCISCO (CBS/BCN/AP) — A fire that burned six buildings and displaced 40 people on the edge of San Francisco’s Mission District has been contained.

The fire broke out Saturday afternoon, sending thick, dark smoke into the air and forcing dozens of residents in the area to flee from their homes.

READ MORE: 'We Just Want Him Back': French Bulldog Stolen at Gunpoint in Oakland

Residents in nearby blocks were also ordered to shelter in place and shut their windows and doors to avoid letting in smoke and chemicals that were in the air from a burned hardware store.

Police said Mission Street between Valencia and 30th streets would be closed until Sunday morning due to burning chemicals.

READ MORE: Chaos, Panic After Shots Rang Out At High School Championship Football Game

4-Alarm Fire Rages

(CBS)

About 150 firefighters were called on at the peak of the effort on Saturday evening to battle the blaze and assist in the evacuation of occupants. Firefighters remained on the scene overnight to monitor the site and make sure no embers re-ignited.

MORE NEWS: KPIX Reporters Remember Slain Security Guard Kevin Nishita; 'Just the Kindest Man'

TM and © Copyright 2016 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2016 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. Bay City News and the Associated Press contributed to this report