HARRISBURG, Pa.—A bomb squad had to remove an explosive chemical from a Pennsylvania Department of Agriculture building after it was found in a laboratory.

State police say an employee working in the lab found the chemical around 5 p.m. Thursday. Officials said the water that keeps the chemical stable had evaporated, making the substance dangerous.

The chemical, piric acid, used to test plants can become explosive when crystalized.

The Harrisburg building was evacuated and the bomb squad detonated the chemical in a nearby field. No injuries were reported.