The effects of dietary probiotic supplementation with viableBacillus subtilisandBacillus amyloliquefaciensspores on sow performance, immunity, gut functional status and biofilm formation by probiotic bacteria in piglets at weaning were investigated. Ninety-six sows reared in a continuous farrowing system for one full cycle were fed gestation diets during the first 90 d of pregnancy and lactation diets until the end of lactation. The sows were fed a basal diet without probiotics (control;n= 48) or a diet supplemented with viable spores (1.1 × 109CFU/kg of feed) (probiotic;n= 48). At 7 d of age, sucking piglets (n= 12/group) were provided prestarter creep feed until weaning at 28 d of age. The piglets in the probiotic group were supplemented with the same probiotic and dosage as their dams. Blood and colostrum collected from sows and ileal tissues collected from piglets on the day of weaning were used for analyses. Probiotics increased the weight of piglets (P= 0.077), improved the weaning weight (P= 0.039) and increased both the total creep feed consumption (P= 0.027) and litter gain (P= 0.011). Probiotics also improved the faecal score in the second (P= 0.013) week of life. The immunoglobulin G (IgG) concentrations in sow blood at farrowing and the IgM concentrations in piglet blood at weaning were higher in the probiotic group than in the control group (P= 0.046). The piglets from the probiotic-treated sows showed a higher IgM concentration in the ileal mucosa (P= 0.050) and a lower IgG concentration in the ileal mucosa (P= 0.021) compared with the piglets from control sows. The probiotic-treated piglets had a thicker ileal mucosa (P= 0.012) due to the presence of longer villi and larger Peyer's patches (P< 0.001).B. subtilisandB. amyloliquefacienswere detected in the probiotic-treated piglets but not the control piglets; these bacteria were present in the digesta and villus structures and formed structures resembling biofilms. Overall,Bacillus-based probiotic supplementation improves the health indices of sows and their piglets.