a b s t r a c tEcological communities are structured by competitive, predatory, mutualistic and parasitic interactions combined with chance events. Separating deterministic from stochastic processes is possible, but finding statistical evidence for specific biological interactions is challenging. We attempt to solve this problem for ant communities nesting in epiphytic bird's nest ferns (Asplenium nidus) in Borneo's lowland rainforest. By recording the frequencies with which each and every single ant species occurred together, we were able to test statistically for patterns associated with interspecific competition. We found evidence for competition, but the resulting co-occurrence pattern was the opposite of what we expected. Rather than detecting species segregationdthe classical hallmark of competitiondwe found species aggregation. Moreover, our approach of testing individual pairwise interactions mostly revealed spatially positive rather than negative associations. Significant negative interactions were only detected among large ants, and among species of the subfamily Ponerinae. Remarkably, the results from this study, and from a corroborating analysis of ant communities known to be structured by competition, suggest that competition within the ants leads to species aggregation rather than segregation. We believe this unexpected result is linked with the displacement of species following asymmetric competition. We conclude that analysing cooccurrence frequencies across complete species assemblages, separately for each species, and for each unique pairwise combination of species, represents a subtle yet powerful way of detecting structure and compartmentalisation in ecological communities.