Defence from parasites and pathogens involves a cost. Thus, it is expected that organisms use this only at high population densities, where the risk of pathogen transmission may be high, as proposed by the "density-dependent prophylaxis" (DDP) hypothesis. These predictions have been tested in a wide range of insects, both in comparative and experimental studies. We think it pertinent to consider a continuum between solitarious and gregarious living insects, wherein: (1) solitarious insects are those that are constitutively solitary and do not express any phenotypic plasticity, (2) the middle of the continuum is represented by insects that are subject to fluctuations in local density and show a range of facultative and plastic changes; and (3) constitutively gregarious forms live gregariously and show the gregarious phenotype even in the absence of crowding stimuli. We aimed to chart some of the intermediary continuum with an insect that presents solitarious aspects, but that is subject to fluctuations in density. Thus, Anticarsia gemmatalis (Lepidoptera: Noctuidae) larvae reared at higher densities showed changes in coloration, a greater degree of encapsulation, had higher hemocyte densities and were more resistant to Baculovirus anticarsia, but not to Bacillus thuringiensis. Meanwhile, with increased rearing density there was reduced capsule melanization. Hemocyte density was the only variable that did not vary according to larval phenotype. The observed responses were not a continuous function of larval density, but an all-or-nothing response to the presence of a conspecific. As A. gemmatalis is not known for gregarious living, yet shows these density-dependent changes, it thus seems that this plastic phenotypic adjustment may be a broader phenomenon than previously thought.