Three major hypotheses have been advanced for the adaptive nature of plant galls: nutrition, enemy-avoidance, and microenvironment. Of these, the microenvironment hypothesis has been frequently invoked, but rarely tested directly. We tested this hypothesis in a population of Andricus quercuscalifornicus (Bassett) (Hymenoptera: Cynipidae) wasps inducing galls on Quercus lobata Née (Fagaceae) trees in Northern California, USA. Relative humidity and temperature data gathered from both immature and mature galls in the field indicated that A. quercuscalifornicus larvae modify their microenvironments significantly by raising and stabilizing relative humidity levels inside galls to near saturation. In addition, excised larvae maintained under experimental conditions survived significantly longer under levels of high relative humidity. These data support the hypothesis that through gall induction, A. quercuscalifornicus manipulates its environment adaptively.