AMHERST — Firefighters called in a hazardous materials response Monday to a University of Massachusetts building after a fire alarm was pulled in response to a chemical reaction.

“The operation went well,” Fire Chief Tim Nelson said Tuesday, noting that no one was hurt.

Nelson said the alarm came in at approximately 5:30 p.m., and that the Fire Department responded to the UMass physical sciences building on North Pleasant Street.

After arriving, the captain on the scene, Capt. Stephen Gaughan, determined that hazmat should be called in, a call that Nelson confirmed was the correct one.

After approximately 20 occupants had left the building or had been evacuated, the Commonwealth of Massachusetts District 4 Regional Hazmat Response Team entered.

“It turns out it was a chemical that’s water reactive,” Nelson said.

Nelson said the reaction occurred in a container and the team isolated the chemical before determining that there was no threat.

Nelson is a founding member of the hazmat team, although he stayed in his role as fire chief during the incident. The response was wrapped up at about 9:30 p.m. and people were allowed to re-enter the building, he said.