BackgroundThe aim of the present study was to characterize the effects of handling stress on the microbiota in the intestinal gut contents of rainbow trout (Oncorhynchus mykiss) fed a plant-based diet from two different breeding lines (initial body weights: A: 124.69 g, B: 147.24 g). Diets were formulated in accordance with commercial trout diets differing in their respective protein sources: fishmeal (35% in fishmeal-based diet F, 7% in plant protein-based diet V) and plant-based proteins (47% in diet F, 73% in diet V). Experimental diets were provided for 59 days to all female trout in two separate recirculating aquaculture systems (RASs; mean temperature: A: 15.17 °C ± 0.44, B: 15.42 °C ± 0.38). Half of the fish in each RAS were chased with a fishing net twice per day to induce long-term stress (Group 1), while the other half were not exposed to stress (Group 0).ResultsNo differences in performance parameters were found between the treatment groups. By using 16S rRNA amplicon sequencing of the hypervariable region V3/V4, we examined the microbial community in the whole intestinal content of fish at the end of the trial. We discovered no significant differences in alpha diversity induced by diet or stress within either genetic trout line. However, the microbial composition was significantly driven by the interaction of stress and diet in trout line A. Otherwise, in trout line B, the main factor was stress. The communities of both breeding lines were predominantly colonized by bacteria from the phylaFusobacteriota, Firmicutes,Proteobacteria,Actinobacteriota, andBacteroidota.The most varying and abundant taxa wereFirmicutesandFusobacteriota, whereas at the genus level,CetobacteriumandMycoplasmawere key components in terms of adaptation. In trout line A,Cetobacteriumabundance was affected by factor stress, and in trout line B, it was affected by the factor diet.ConclusionWe conclude that microbial gut composition, but neither microbial diversity nor fish performance, is highly influenced by stress handling, which also interacts with dietary protein sources. This influence varies between different genetic trout lines and depends on the fish’s life history.Supplementary InformationThe online version contains supplementary material available at 10.1186/s42523-023-00253-9.