Until recently, the study of negative and antagonistic interactions (for example, competition and predation) has dominated our understanding of community structure, maintenance and assembly1. Nevertheless, a recent theoretical model suggests that positive interactions (for example, mutualisms) may counterbalance competition, facilitating long-term coexistence even among ecologically undifferentiated species2. Müllerian mimics are mutualists that share the costs of predator education3 and are therefore ideally suited for the investigation of positive and negative interactions in community dynamics. The sole empirical test of this model in a Müllerian mimetic community supports the prediction that positive interactions outweigh the negative effects of spatial overlap4 (without quantifying resource acquisition). Understanding the role of trophic niche partitioning in facilitating the evolution and stability of Müllerian mimetic communities is now of critical importance, but has yet to be formally investigated. Here we show that resource partitioning and phylogeny determine community structure and outweigh the positive effects of Müllerian mimicry in a species-rich group of neotropical catfishes. From multiple, independent reproductively isolated allopatric communities displaying convergently evolved colour patterns, 92% consist of species that do not compete for resources. Significant differences in phylogenetically conserved traits (snout morphology and body size) were consistently linked to trait-specific resource acquisition. Thus, we report the first evidence, to our knowledge, that competition for trophic resources and phylogeny are pivotal factors in the stable evolution of Müllerian mimicry rings. More generally, our work demonstrates that competition for resources is likely to have a dominant role in the structuring of communities that are simultaneously subject to the effects of both positive and negative interactions.