The ecological impacts of animal groups may be different and predictable depending on their collective behavior. Farmerfish (Stegastes nigricans) live in social groups and collectively defend gardens of palatable algae. These gardens also serve as settlement and nursery habitats for corals because farmerfish mob corallivores that attempt to forage on corals within their gardens. We detected large among-colony differences in farmerfish collective aggression towards intruder fish that persist across years. We further found that the territories of aggressive groups and territories containing larger farmerfish provided greater protection to corals than non-aggressive groups: territories of aggressive groups naturally harbored more branching corals than non-aggressive groups, and experimentally outplanted branching corals experienced 80% less skeletal loss and grew larger over 25 weeks in aggressive territories and in territories guarded by larger fish. These findings hint that factors that increase farmerfish group aggressiveness (e.g., higher temperatures) could enhance the protective value of their territories for the replenishment of coral populations.