Two students from Saint Joseph’s College in Standish each pleaded guilty Tuesday to a charge of criminal use of explosives for throwing acid bombs out of their second-story dorm window in February.

Both Victor Santos, 18, of Framingham, Massachusetts, and Brandon Ward, 19, of Houlton pleaded guilty in Cumberland County Unified Criminal Court under the terms of a plea agreement in which the charges will be dismissed in a year, if they stay out of trouble.

Judge E. Mary Kelly warned the men that the outcome of the so-called deferred disposition depended on their behavior and also ordered them each to serve 100 hours of community service.

The state Fire Marshal’s Office charged Santos and Ward after they threw three acid bombs Feb. 5. Two of the soda bottle devices exploded near an emergency exit at Standish Hall. The third device, in a milk jug, failed to detonate, according to the prosecutor in the case, Assistant District Attorney Hannah May.

An acid bomb is usually made from household solvents placed inside a plastic soda bottle that explodes in a chemical reaction. The acidic spray can injure to someone on contact.

No one was injured in the incident, although there were more than 100 students in the building at the time.

Santos and Ward were freshmen at the time and are now entering their sophomore year.