We constructed recombinant inbred lines of a cross between naturally occurring ecotypes of Avena barbata (Pott ex Link), Poaceae, associated with contrasting moisture environments. These lines were assessed for fitness in common garden reciprocal transplant experiments in two contrasting field sites in each of two years, as well as a novel, benign greenhouse environment. An AFLP (amplified fragment length polymorphism) linkage map of 129 markers spanned 644 cM in 19 linkage groups, which is smaller, with more linkage groups, than expected. Therefore parts of the A. barbata genome remain unmapped, possibly because they lack variation between the ecotypes. Nevertheless, we identified QTL (quantitative trait loci) under selection in both native environments and in the greenhouse. Across years at the same site, the same loci remain under selection, for the same alleles. Across sites, an overlapping set of loci are under selection with either (i) the same alleles favoured at both sites or (ii) loci under selection at one site and neutral at the other. QTL under selection in the greenhouse were generally unlinked to those under selection in the field because selection acted on a different trait. We found little evidence that selection favours alternate alleles in alternate environments, which would be necessary if genotype by environment interaction were to maintain genetic variation in A. barbata. Additive effect QTL were best able to explain the genetic variation among recombinant inbred lines for the greenhouse environment where heritability was highest, and past selection had not eliminated variation.