Effects of volatile odors from leek, Allium porum L., on the behavior of bean fly, Ophiomyia phaseoli (Tryon) (Diptera: Agromyzidae), were tested in laboratory olfactometer bioassays. Aqueous and solvent extracts (dichloromethane and methanol) of leek were repellent to adult flies. Whole leek plants were repellent and prevented attraction to the host plant, beans. Beans that had been exposed to volatiles from living leek plants for 7 d became repellent to the fly. Leek and several other crops were tested in field experiments to identify candidate crops for a mixed cropping system to minimize bean fly attack in beans, Phaseolus vulgaris L. In a wet season field experiment, mixed cropping of bean with leek or three other vegetable crops did not significantly reduce bean fly infestation or infection with Fusarium oxysporum Schltdl. compared with a mono crop, but significantly reduced plant death caused by both agents combined. In two dry season field experiments, mixed cropping of beans with leek significantly reduced adult bean fly settling, emergence, and death of bean plants compared with a mono crop. Bean yield per row was ∼150% higher for the mixed crop, and economic returns were approximately Sri Lankan Rs. 180,000/ha, higher than for the mono crop. For the mono crop, the farmer had a monetary loss, which would become a small profit only if the costs of family labor are excluded. The study is an example of the first steps toward development of sustainable plant protection in a subsistence system.