Compositions and methods for the controlled delivery of acid to a desired location. In some embodiments, methods for in situ acid stimulation of a subterranean formation that contains a hydrocarbon reservoir comprise contacting the formation with an aqueous fluid that comprises (a) an ammonium salt capable of being oxidized to produce acid and (b) an oxidizing agent capable of oxidizing the ammonium salt, where the ammonium salt and oxidizing agent react to produce an acid.