Dysbiosis in the vertebrate gut microbiome has been associated with several diseases. However, it is unclear whether particular gut regions or specific time periods during ontogeny are responsible for the development of dysbiosis, especially in non-model organisms. Here we examine the microbiome associated with dysbiosis in different parts of the gastrointestinal tract (ileum, caecum, colon) in a long-lived bird with high juvenile mortality, the ostrich. Individuals that died of gut disease (n=68) had substantially different microbial composition from age-matched controls (n=50) throughout the gut. Several taxa were associated with mortality (Enterobacteriaceae, Peptostreptococcaceae, Porphyromonadaceae, Clostridium) and some with survival (Lachnospiraceae, Ruminococcaceae, Erysipelotrichaceae, Turicibacter). Repeated faecal sampling showed that pathobionts were already present shortly after hatching and proliferated in individuals with low diversity, resulting in mortality weeks later. The factors influencing seeding of the gut microbiota may therefore be key to understanding dysbiosis and host development.