The reason water is explosive when used to try and extinguish a class D fire, is burning metals such as magnesium, lithium or sodium, produce extremely intense heat, easily exceeding 5000°F. Temperatures this high cause the water molecules to decompose into their bases, hydrogen and oxygen, adding fuel to the blaze. CO² also cause more intense burning by stripping the carbon atoms away from the O² thereby adding oxygen.