The development of crops genetically engineered for pathogen resistance has raised concerns that crop-to-wild gene flow could release wild or weedy relatives from regulation by the pathogens targeted by the transgenes that confer resistance. Investigation of these risks has also raised questions about the impact of gene flow from conventional crops into wild plant populations. Viruses in natural plant populations can play important roles in plant fecundity and competitive interactions. Here, we show that virus-resistance transgenes and conventional crop genes can increase fecundity of wild plants under virus pressure. We asked how gene flow from a cultivated squash (Cucurbita pepo) engineered for virus resistance would affect the fecundity of wild squash (C. pepo) in the presence and absence of virus pressure. A transgenic squash cultivar was crossed and backcrossed with wild C. pepo from Arkansas. Wild C. pepo, transgenic backcross plants, and non-transgenic backcross plants were compared in field plots in Ithaca, New York, USA. The second and third generations of backcrosses (BC2 and BC3) were used in 2002 and 2003, respectively. One-half of the plants were inoculated with zucchini yellow mosaic virus (ZYMV), and one-half of the plants were maintained as healthy controls. Virus pressure dramatically decreased the fecundity of wild C. pepo plants and non-transgenic backcross plants relative to transgenic backcross plants, which showed continued functioning of the virus-resistance transgene. In 2002, non-transgenic backcross fecundity was slightly higher than wild C. pepo fecundity under virus pressure, indicating a possible benefit of conventional crop alleles, but they did not differ in 2003 when fecundity was lower in both groups. We detected no fitness costs of the transgene in the absence of the virus. If viruses play a role in the population dynamics of wild C. pepo, we predict that gene flow from transgenic, virus-resistant squash and, to a much lesser extent, conventionally bred squash would increase C. pepo fecundity. Studies such as this one, in combination with documentation of the probability of crop-to-wild gene flow and surveys of virus incidence in wild populations, can provide a solid basis for environmental risk assessments of crops genetically engineered for virus resistance.