In mammals, the maternal microbiome influences both mother and infant health and can be used to predict the likelihood of preterm birth. The mother’s number of previous pregnancies, or parity, can also affect preterm birth risk, but whether parity influences the maternal or infant microbiome is unclear. A recent study used marker gene sequencing and metagenomics analyses of stool samples to investigate the microbiomes of pregnant pigs of different parities and their offspring. Microbiome “maturity index” and Dirichlet multinomial mixtures (DMM) model analyses indicated that the sow microbiome changed in predictable ways throughout pregnancy and that the changes occurred more rapidly in sows with higher numbers of previous pregnancies. Parity (high vs. zero) was linked to the levels of specific types of bacteria in the maternal gut at the end of pregnancy. Sow parity also affected the abundances of certain metabolism-related bacteria in the piglet gut 10 days after birth. Although samples were not collected in early pregnancy due to difficulties in reliable pregnancy detection, the results show that pregnancy history affects the maternal and infant gut microbiomes in pigs and suggest that the influence of parity should be considered in studies on the human microbiome during pregnancy and infancy.