Collective decisions have been extensively studied in arthropods, but they remain poorly understood in heterospecific groups. This study was designed to (1) assess the collective behaviours of blow fly larvae (Diptera: Calliphoridae) in groups varying in density and species composition, and (2) relate them to the costs and benefits of aggregating on fresh or decomposed food. First, experiments testing conspecific groups of Lucilia sericata and Calliphora vicina larvae, two species feeding at the same time on fresh carcasses, demonstrated decreases in growth and survival on rotten beef liver compared with fresh liver. However, mixing species together reduced this adverse impact of decomposition by increasing the mass of emerged adults. Second, larval groups were observed in binary choice tests between fresh and rotten liver (i.e. optimal and sub-optimal food sources). The results showed that larvae interacted with each other and that these interactions influenced their food preferences. We observed that (1) larvae were able to collectively choose the optimal food, (2) their choice accuracy increased with larval density and (3) the presence of another species induced a reversal in larval preference towards rotten food. These results highlight the ubiquity of collective decision properties in gregarious insects. They also reveal an unexpected effect of interspecific association, suggesting the colonization of new resources through a developmental niche construction.