Animal rehabilitation centres provide a unique opportunity to study the microbiome of wild animals as subjects can be sampled longitudinally. Rehabilitation may have unintended consequences on the animals' microbiome because of a less varied and suboptimal diet, possible medical treatment and exposure to a different environment and human handlers. Our study describes the gut microbiome of two large seal cohorts (pups and weaners) of stranded harbour seals admitted for rehabilitation at the Sealcentre Pieterburen, the Netherlands, and the effect of rehabilitation on it. We observed that during rehabilitation, there is an increase in the relative abundance of Campylobacterota and Actinobacteriota. The alpha diversity of the pup’s microbiome increased significantly during rehabilitation, while there were no significant changes for weaners. At release, Shannon diversity of the pup’s microbiome was related considerably to sex, but no determinants were found for weaners. Sex significantly influenced the pups’ microbiome composition before release, and for weaners, sex and age were significant factors. We conclude that the gut microbiome alpha and beta diversities of seal pups and the gut microbiome beta diversity of seal weaners show differences before and after rehabilitation but do not display a reduced alpha-diversity.