Copyright © 2020 Heys et al. In recent years, a wealth of studies has examined the relationships between a host and its microbiome across diverse taxa. Many studies characterize the host microbiome without considering the ecological processes that underpin microbiome assembly. In this study, the intestinal microbiota of Atlantic salmon, Salmo salar, sampled from farmed and wild environments was first characterized using 16S rRNA gene MiSeq sequencing analysis. We used neutral community models to determine the balance of stochastic and deterministic processes that underpin microbial community assembly and transfer across life cycle stage and between gut compartments. Across gut compartments in farmed fish, neutral models suggest that most microbes are transient with no evidence of adaptation to their environment. In wild fish, we found declining taxonomic and functional microbial community richness as fish mature through different life cycle stages. Alongside neutral community models applied to wild fish, we suggest that declining richness demonstrates an increasing role for the host in filtering microbial communities that is correlated with age. We found a limited subset of gut microflora adapted to the farmed and wild host environment among which Mycoplasma spp. are prominent. Our study reveals the ecological drivers underpinning community assembly in both farmed and wild Atlantic salmon and underlines the importance of understanding the role of stochastic processes, such as random drift and small migration rates in microbial community assembly, before considering any functional role of the gut microbes encountered.IMPORTANCE A growing number of studies have examined variation in the microbiome to determine the role in modulating host health, physiology, and ecology. However, the ecology of host microbial colonization is not fully understood and rarely tested. The continued increase in production of farmed Atlantic salmon, coupled with increased farmed-wild salmon interactions, has accentuated the need to unravel the potential adaptive function of the microbiome and to distinguish resident from transient gut microbes. Between gut compartments in a farmed system, we found a majority of operational taxonomic units (OTUs) that fit the neutral model, with Mycoplasma species among the key exceptions. In wild fish, deterministic processes account for more OTU differences across life stages than those observed across gut compartments. Unlike previous studies, our results make detailed comparisons between fish from wild and farmed environments, while also providing insight into the ecological processes underpinning microbial community assembly in this ecologically and economically important species.