Fremont police Detective Bill Veteran said the man approached a crew doing roof work on an apartment complex at Walnut Avenue and Guardino Drive around 11 a.m. and began yelling at them in a foreign language, Veteran said.
The man had a handgun with him, although it was not clear whether he aimed it at the work crew, Veteran said.
The man withdrew to an apartment unit in the building and refused to come out. Police evacuated surrounding apartments and put the nearby California School for the Deaf on lockdown around 11:45 a.m.
The man eventually "came out and was taken without incident" around 3 p.m., Veteran said.
The lockdown at the California School for the Deaf occurred during lunch hour, said school Superintendent Henry Klopping. Roughly 450 students had to come inside and remain in their classrooms until the lockdown was lifted around 1:30 p.m.