Interaction networks within biotic communities can be dramatically altered by anthropogenic habitat modification. Ants, an important ecological group, often interact competitively to form mosaic-like patterns in disturbed plantation habitats, in which dominant species form mutually exclusive territories. However, the existence of these ant mosaics in pristine forests is contentious. Here we assess the relative strengths of ant competitive interactions in oil palm plantation and primary rain forest in Sabah, Malaysia, using null models of species co-occurrence. We use two metrics: the C-score, which measures mean degree of overall co-occurrence, and a novel metric, the Cvar-score, which measures the variance in degree of co-occurrence. We also investigate the role of nest sites by collecting ants from canopy and leaf litter microhabitats, and from epiphytic ferns, an important nest site for canopy ants. Furthermore, we assess whether non-native species, which were widespread in oil palm plantation (61 occurrences vs five in rain forest) are important in driving the formation of ant mosaics. We found no evidence for ant mosaics in any primary forest microhabitat. In oil palm plantation, segregation between species was pronounced in epiphytes, weak in the rest of the canopy and absent in leaf litter communities. Intriguingly, exclusion of non-native ant species from analyses increased the degree of negative species co-occurrence in all three microhabitats, with species segregation in the oil palm canopy becoming statistically significant. Our results suggest that invasion of plantation habitats by non-native species does not drive increased species segregation in ant communities. Rather, high degrees of species segregation might relate to changes in the importance of canopy nest sites, with colonies competing more strongly for these in plantations. In primary forests, weaker nest-site limitation and the highly complex, more vertically stratified, non-uniform canopy could lead to random co-occurrence between ant species at the scales studied here.