Significant differences occur in the levels and types of aliphatic glucosinolates in leaves of plants of four Brassica oleracea populations in Dorset. Plants in grassland at St Aldhelm's Head and Winspit have high levels of 3-butenyl glucosinolate, whereas plants of an adjacent population growing on and along the top of cliffs at Kimmeridge have low levels of 2-hydroxy-3-butenyl, 2-propenyl and methylsuiphinylalkyl glucosinolates. Plants growing in a variable habitat at Worbarrow Tout have intermediate levels. The differences in occurrence of individual glucosinolates result from allelic variation at four loci. The level of total aliphatic glucosinolates is under more complex genetic control, but is shown to be highly heritable. Allele frequencies at isozyme loci indicate that genetic variation for glucosinolate production is unlikely to have arisen or to be maintained by founder effects or genetic drift. It is suggested that there is selection for high levels of butenyl glucosinolates at St Aldhelm's Head and Winspit because of grazing by generalist herbivores, whereas there is selection for low levels of 2-hydroxy-3-butenyl and other non-butenyl aliphatic glucosinolates at Kimmeridge because of two factors. First, plants effectively escape from generalist herbivores because of physical aspects of the habitat and association with other plant species which provide physical and chemical defences. Thus there is selection for individuals which do not carry the hypothetical metabolic costs of glucosinolate biosynthesis. Secondly, herbivory by specialist cruciferous insects at Kimmeridge, which is enhanced because of the local abundance of B. nigra, selects for individuals which have low levels of 2-hydroxy-3-butenyl glucosinolates.