We have collected several hundred Drosophila melanogaster flies (near Davis, California), isolated them individually, without anesthesia, at the collecting site, and estimated the fitness components of the wild-caught females under different environmental conditions. The fitness parameters measured are fecundity, oviposition rate, and productivity (egg-to-adult viability, development rate, and number of progeny). The environmental variables are two temperatures (22 degrees C and 28 degrees C) and two densities ('scant' and 'crowded'). After the fitness measurements are completed for each individual female, its genotype is determined at four loci encoding enzymes: GPDH and ADH, located on chromosome II; and PGM and EST-C, located on chromosome III. Density has a large significant effect on productivity; temperature has significant effects on fecundity, oviposition rate, and development rate. The experiments show that allozyme polymorphisms are associated with selection effects. Fitness differences between allozyme genotypes occur for all fitness components, except oviposition rate. But which genotype is superior depends on the environmental conditions; heterozygotes exhibit higher fitness than homozygotes in a number of cases, but inferior in others. A unique feature of the present experiments is that the experimental flies are wild-caught females rather than laboratory-bred individuals.