Galls are neoformed structures on host plant tissues caused by the attack of insects or other organisms. They support different communities of specialized parasitic insects (the gall inducers), and can also provide refuge to other insects, such as moths, beetles and ants, referred to as secondary occupants. This study focuses on galls induced by the oak gall wasp Andricus quercustozae and secondarily colonized by ants in a mixed oak forest. A field survey and two experiments were carried out to a) study ant (species-specific) preferences for different features of the galls, b) describe differences in gall architecture due to ant activity, c) analyse the effects of the presence of gall-dwelling ants on plant health. The results show that there are differences between ant species in gall colonization and in the alteration of gall opening and inner structure. We verified that gall-dwelling ants protect their host plants efficiently, offering them an indirect defence mechanism against enemies (predators and pathogens). The data suggest a new paradigm in ant–plant relationships mediated by the presence of galls on the plants whose ecological and evolutionary implications are discussed.