An ill-advised attempt to break into a safe with a welding torch wound up costing two men their lives.

According to investigators in New Hampshire, the thieves were using a welding torch to crack open the safe when they accidentally set off fireworks stored inside.

Police say the two were trying to open up the four-foot-high, concrete-lined safe with an oxyacetylene torch at a landscaping shop when the explosion occurred.

WCVB reports the resulting explosion was so powerful that it blew the huge safe through the building, landing it outside.

Investigators don't believe the men knew there were fireworks inside the safe. Lucas Bourke and Ethan Keeler, both 21, were killed in the blast.

Deputy Chief Robert Farley of the New Hampshire Fire Marshal's Office said, "Any time you have pyrotechnics sealed in a container, when it burns, it creates very high pressure that burns very rapidly, and that's what caused the explosion."