A system and method for controlling bacteria, especially lactic and acetic acid bacteria in the production of ethanol using an organic oxidizing compound in combination with an inorganic oxidizer is provided. Particularly, a mixture of one or more peroxy acids and one or more peroxide compounds is introduced into a fermentation mash so as to inhibit or reduce levels of bacteria that compete with yeast for the fermentation sugars. The peroxy acid and peroxide compounds largely are consumed during the fermentation process and are generally not present in the fermentation by-products, especially recovered distillers grains.