Studies of host–parasite dynamics usually consider one, or at most two, host species, neglecting the possible effects of other species on the focal hosts and vice versa. To explore the interaction of community structure with host–parasite dynamics, we model the invasion of stable communities of varying size by a parasite. The communities are generated with random interaction coefficients and connectance 0.5. Each community is invaded by parasites with different values of virulence (disease-induced host mortality rate), specificity and transmission rate. The result of each invasion is determined by numerically simulating the dynamics of the community. We classify the outcomes by whether the parasite successfully establishes in the focal host population(s), and, if so, by the proportion of host and non-host species that go extinct as a result of the parasite's introduction. We discuss how the structure of the community and the interaction between hosts and other species affect several important processes of disease ecology: the density threshold for parasite invasion, extinction cascades caused by the parasite, and the frequency of extinctions of hosts and non-hosts. In our simulated communities, non-host species went extinct more frequently than hosts, suggesting the importance of the community context of disease. In some cases, the parasite's invasion induced regular population cycles in the previously stable community.