This study aimed to describe the underlying mechanism behind the AHPND protective effect of a biofloc system in Litopenaeus vannamei. First, t he results confirmed that a biofloc system maintained at a C/N ratio of 15, improves the water quality and contributes to the nutrition of cultured animals as bioflocs might serve as an additional protein source. Secondly , the study demonstrated that the biofloc system enhances the survival of L. vannamei upon challenge with a V. parahaemolyticus AHPND strain. Remarkably, the results highlight that in the biofloc system, AHPND-causing V. parahaemolyticus possibly switch from virulent planktonic phenotype , producing AHPND toxins, to a non-virulent biofilm phenotype (not producing APHND toxins), as demonstrated by a decreased transcription of flagella-related motility genes (flaA, CheR, and fliS ), Pir toxin (PirBVP), and AHPND plasmid genes (ORF14) . In contrast an increased expression of the phenotype switching marker AlkPhoX gene was observed in both in vitro (in the biofloc ) and in vivo ( in the stomach of biofloc-based shrimp) conditions. Taken together, results suggest that bioflocs steer phenotype switching, contributing to the decreased virulence of V. parahaemolyticus AHPND strain towards shrimp postlarvae. This information opens the possibility to combat AHPND not only by trying to eliminate the AHPND-causing V. parahaemolyticus from the system but rather to steer the system allowing for a phenotypic switch of V. parahaemolyticus.