1 The grass Festuca ovina is an important constituent of the species-rich 'alvar' grasslands on the Baltic island of Oland. Levels of allozyme polymorphism are high and variation is known to be correlated with habitat variation (soil moisture, pH and depth). 2 A 9-year field experiment on species diversity provided replicate plots (in three sites) that had been subjected to six different experimental treatments (control; N + P + K; P + K; N + K; K; water). 3 Samples of F. ovina were collected and analyses of deviance were used to investigate associations between allele frequencies, at each of four polymorphic loci, and the nutrient/water treatments. We also used the models to estimate predicted values for the alleles in different nutrient/water treatments and in interactions involving the nutrient/water treatments and additional explanatory variables (vegetation height and clipping). 4 There were significant allozyme frequency differences between samples of F. ovina from the six different nutrient/water treatments in the grassland experiment. Frequencies in the fertilized or watered plots had diverged from those in the control plots. There were also significant allele-habitat associations (after the removal of site effects), especially at the Pgi-2 locus. 5 Soil moisture was the only variable that was common to this study and an earlier study of variation in F. ovina in natural habitats. In natural populations, the Pgi-2-2 allele was significantly associated with soil moisture and was more common in dry habitats. Our findings that the frequency of the Pgi-2-2 allele was significantly affected by the nutrient/water treatments, and that it was rarest in the treatment that involved the addition of extra water, were therefore as predicted. 6 The study supports the conclusion, from an earlier study of populations in unmanipulated grassland habitats, that selection is contributing to the fine-scale patterning of genetic variation in the alvar populations of F. ovina.