1. The pine sawfly, Neodiprion autumnalis, infests ponderosa pine, Pinus ponderosa, growing at low densities near the bottom of an altitudinal gradient in Arizona, U.S.A. The relative importance of host-plant quality vs, natural-enemy effects in determining the spatial distribution of this sawfly was examined over a 3-year period. 2. Field and laboratory bioassays were conducted on all life stages of N. autumnalis at two forest stand densities (high greater than or equal to 23 m(2) ha(-1) low less than or equal to 7 m(2) ha(-1)) and at two elevations (bottom slope = 2390 m, top slope = 2540 m). These experiments were used for constructing life tables of N. autumnalis that compared the effects of host-plant quality on oviposition preference and progeny performance with the effects of natural enemies at different tree densities and elevations. 3. Life-table analyses determined that mortality attributed to host-plant effects during the egg and larval stages had the largest impact on fitness between tree densities and elevations. 4. Natural enemies caused a significant reduction in progeny survival, but their effects were similar across all tree densities and elevations during egg and larval life stages. However, cocoon-stage survival did vary between tree densities and elevations due to natural-enemy effects. 5. It was concluded that the observed oviposition preference for, and higher progeny performance on, trees at low densities and bottom slope elevations were caused primarily by host-plant effects. 6. These results further the argument that heterogeneity at the resource level (i.e. bottom-up forces) determines potential outcomes of multitrophic level interactions.