Very little is known about the impact of n-3 long-chain fatty acids (n-3 LCFAs) on the microbiota of sows and their piglets. The aim of this study was to evaluate the effect of n-3 LCFA in sow diets on the microbiota composition of sows' feces, colostrum, and milk as well as that of piglets' feces. Twenty-two sows were randomly assigned to either a control or an n-3 LCFA diet from service to weaning. Sows' and piglets' performance was monitored. The gestating and lactating sows' microbiomes in feces, colostrum, and milk were characterized by 16s ribosomal RNA gene sequencing. The fecal microbiome from the two lowest (>800 g) and the two highest birth weight piglets per litter was also characterized, and the LPS levels in plasma were analyzed at weaning. n-3 LCFA increased microbiota alpha diversity in suckling piglets' and gestating sows' feces. However, no effects were observed in colostrum, milk, or lactating sows' feces. Dietary n-3 LCFA modified the microbiota composition of gestating sows' feces, milk, and suckling piglets' feces, without affecting lactating sows' feces or colostrum. In gestating sows' feces and milk, the decrease in genus Succinivibrio and the increase of Proteobacteria phylum, due to the increased genera Brenneria and Escherichia, respectively, stand out. In the feces of suckling piglets, the higher abundance of the beneficial genus Akkermansia and Bacteroides, and different species of Lactobacillus are highlighted. In addition, positive correlations for families and genera were found between lactating sows' feces and milk, milk and suckling piglets' feces, and lactating sows' feces and suckling piglets' feces. To conclude, dietary n-3 LCFA had a positive impact on the microbiome of suckling piglet's feces by increasing microbial diversity and some beneficial bacteria populations, had a few minor modifications on the microbiome of milk and gestating sows' feces and did not change the microbiome in lactating sows' feces or colostrum. Therefore, this study shows the effect of dietary n-3 LCFA on the microbiota of sows, colostrum, milk, and suckling piglets during the lactation period providing crucial information on the microbiota status at the early stages of life, which have an impact on the post-weaning.