Knowledge of periparturient longitudinal changes in sow microbiota composition is necessary to fully understand her role in the development of the piglet microbiota, but also to improve gut health and performance of the sow in lactation. Primiparous sows face the challenge of partitioning nutrients to support maternal growth in addition to supporting foetal growth and the demands of lactation. Additional metabolic stress present during the periparturient period may induce changes in the microbiota profile between primiparous and multiparous sows. Using 16S rRNA gene sequencing, the study aimed to characterise the longitudinal changes in the periparturient microbiota and identify differences within the sow microbiota profile associated with parity. Faecal samples from primiparous (n = 13) and multiparous (n = 16) sows were collected at four different time points (day - 6, - 1, 3 and 8) in relation to farrowing (day 0). Microbiota richness was lowest on day 3 and - 1 of the periparturient period (P < 0.05). Microbiota community composition, assessed by weighted and unweighted UniFrac distances, demonstrated longitudinal changes, with day 3 samples clustering away from all other sampling time points (P < 0.05). The relative abundance of several genera segregated gestation from lactation samples including Roseburia, Prevotella 1, Prevotella 2, Christensenellaceae R-7 group, Ruminococcaceae UCG-002 and Ruminococcaceae UCG-010 (P < 0.01). Furthermore, day 3 was characterised by a significant increase in the relative abundance of Escherichia/Shigella, Fusobacterium and Bacteroides, and a decrease in Alloprevotella, Prevotellaceae UCG-003 and Ruminococcus 1 (P < 0.001). Primiparous sows had overall lower periparturient microbiota diversity (P < 0.01) and there was a significant interaction between parity and sampling time point, with primiparous sows having lower microbiota richness on day - 6 (P < 0.001). There was a significant interaction between sow parity and sampling time point on microbiota composition on day - 6 and - 1 (unweighted UniFrac distances; ≤ 0.01) and day 8 (weighted and unweighted UniFrac distances; P < 0.05). Whilst no significant interactions between sow parity and sampling day were observed for genera relative abundances, multiparous sows had a significantly higher relative abundance of Bacteroidetes dgA-11 gut group and Prevotellaceae UCG-004 (P < 0.01). This study demonstrates that the sow microbiota undergoes longitudinal changes, which are collectively related to periparturient changes in the sow environment, diet and physiological changes to support foetal growth, delivery and the onset of lactation, but also sow parity.