Pangenomes are collections of annotated genome sequences of multiple individuals of a species. The structural variants uncovered by these datasets are a major asset to genetic analysis in crop plants. Here, we report a pangenome of barley comprising long-read sequence assemblies of 76 wild and domesticated genomes and short-read sequence data of 1,315 genotypes. An expanded catalogue of sequence variation in the crop includes structurally complex loci that have become hot spots of gene copy number variation in evolutionarily recent times. To demonstrate the utility of the pangenome, we focus on four loci involved in disease resistance, plant architecture, nutrient release, and trichome development. Novel allelic variation at a powdery mildew resistance locus and population-specific copy number gains in a regulator of vegetative branching were found. Expansion of a family of starch-cleaving enzymes in elite malting barleys was linked to shifts in enzymatic activity in micro-malting trials. Deletion of an enhancer motif is likely to change the developmental trajectory of the hairy appendages on barley grains. Our findings indicate that rapid evolution at structurally complex loci may have helped crop plants adapt to new selective regimes in agricultural ecosystems.