The first floor of the four story apartment complex along the 700 block of Santa Clara Avenue was evacuated.
Residents in the other parts building were told to shelter in place.
Officials later confirmed the hazardous material was bear spray.
A "known subject" went into the building and sprayed the bear spray on purpose, fire officials said. Police are investigating.
Streets were closed between Webster St. and Page St.
As of 6 p.m., fire officials tell ABC7 Eyewitness News, they are beginning the process of letting people back into the building.
If you're on the ABC7 News app, click here to watch live