The city of Toronto had to boost the water pressure for firefighters to battle a six-alarm blaze at a mattress factory in midtown Toronto, near the busy intersection of Dufferin and Eglinton on Wednesday.

Residents who lived in the area were asked to keep their doors and windows closed because of the potentially toxic black smoke drifting across the city.

At least four buildings were evacuated and eight schools were under a 'shelter in place' order as a precaution. Students had been kept inside during recess, windows were closed and the ventilation system was shut off, according to Toronto District School Board spokesperson Ryan Bird. Students were allowed to go home at 3:30 p.m.

Employers of the mattress factory told CTV Toronto they first saw smoke coming out from the building around 8:30 a.m. Wednesday morning.

Around 120 firefighters and 30 fire trucks arrived at 198 Fairbank Ave., in the Dufferin Street and Eglinton Avenue West area after the fire was reported.

Due to safety concerns, firefighters positioned themselves outside of the building to battle the blaze.

Large sections of the building including parts of the roof collapsed in the fire.

"With the collapse we've seen, it made no sense to go in," Toronto Fire deputy chief Mike McCoy told reporters.

Of the 40 employees who work at the factory, all are believed to have escaped the fire. There were no reports of injuries.

The damage is estimated at more than $500,000 so far.

Dealing with dangerous smoke

The cloud of acrid smoke could be seen from as far away as the waterfront, which is about 11 kilometres from the scene.

Toronto fire officials told residents to stay indoors and turn off the HVAC system in larger buildings.

Tony Munoz of the Ministry of Environment told CTV Toronto they had been tracking the air quality throughout the day using "triple quadruple spectrometer," which is an analyzer that tracks volatile organic compounds.

According to the ministry's first readings, the air quality was below emergency level in the city.

With a report from CTV Toronto's Scott Lightfoot and Zuraidah Alman