In shrimp pond aquaculture, bacterial diseases cause production failures and economic losses. Since probiotic applications fail to prevent bacterial diseases, such as white faeces disease (WFD), understanding environmental conditions and bacterial community dynamics are essential to minimize rearing problems including disease outbreaks. We analysed pond water quality and compared bacterial communities in water as well as in intestines and faeces of healthy and diseased shrimps, respectively, via 16S rRNA gene sequencing and quantitative PCR. WFD occurred when pH decreased to 7.71-7.84 and the aquatic bacterial communities became dominated by Alteromonas, Pseudoalteromonas and Vibrio. The disease severity further correlated with increased proportions of opportunistic pathogenic bacteria, such as Alteromonas, Photobacterium, Pseudoalteromonas and Vibrio in shrimp faeces. They constituted up to 60% and 80% of the sequences in samples from the early and advances stages of the disease outbreak, respectively, and exhibited a high degree of co-occurrence. Furthermore, toxR and tlh genes were detected in pond waters at the disease event only. Notably, bacterial community resilience in pond water occurred when pH was adjusted to 8, and was followed by shrimp recovery. Our results highlighted that pH, water, intestinal and faecal bacterial community composition are important factors in preventing WFD events.