Numerous studies have documented molecular variability in plant virus populations, but few have assessed the relative contribution of natural selection and genetic drift in generating the observed pattern of diversity. To this end, gene function, environment and phylogenetic history were examined to observe the effect on genetic diversity and population structure of the PAV and PAS species of Barley yellow dwarf virus (family Luteoviridae). Three functional classes of gene were analysed: transcription-related (RdRp), structural (CP) and movement-related (MP). The results indicate that there were no inherent differences, in terms of total diversity or diversity at synonymous or non-synonymous nucleotide sites, between functional classes of genes or populations. Rather, selective constraints on a gene may be more or less relaxed depending on its function and the phylogenetic history of the population sampled. The CP of the PAS species, but not the PAV species, was differentiated genetically between regions. This is probably due to genetic drift, as there was no evidence that any gene deviated from a neutral model of evolution or is under positive selection. In general, the MP was under considerably less functional constraint than structural or replication-related proteins and four positively selected codon sites were identified. Mutations at these sites differentiate species and geographical subpopulations, so presumably they have aided the virus in adaptation to its host environment and contributed to intra- and interspecies diversification.